feat: locale support for date filter, #567 (#723)

This commit is contained in:
Jun Yang
2024-07-22 00:39:44 +08:00
committed by GitHub
parent 542a75fd44
commit e4aeb023fd
29 changed files with 511 additions and 318 deletions
+16
View File
@@ -0,0 +1,16 @@
import { LiquidDate } from '../../src/util'
const locale = Intl.DateTimeFormat().resolvedOptions().locale
export class DateWithTimezone extends LiquidDate {
constructor (init: string, timezone: number) {
super(init, locale)
this.getTimezoneOffset = () => timezone
}
}
export class TestDate extends LiquidDate {
constructor (v: any) {
super(v, locale)
}
}