Skip to content

Commit

Permalink
feat: makes hour time format always 2 digits (#2452)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir20 authored Oct 27, 2023
1 parent a8bc1dd commit b88fc3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion assets/auto-imports.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ declare global {
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue'
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
}
// for vue template auto import
import { UnwrapRef } from 'vue'
Expand Down
2 changes: 1 addition & 1 deletion assets/components/common/DateTime.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const dateFormatter = new Intl.DateTimeFormat(undefined, { day: "2-digit", month
const use12Hour = $computed(() => ({ auto: undefined, "12": true, "24": false })[hourStyle.value]);
const timeFormatter = $computed(
() =>
new Intl.DateTimeFormat(undefined, { hour: "numeric", minute: "2-digit", second: "2-digit", hour12: use12Hour }),
new Intl.DateTimeFormat(undefined, { hour: "2-digit", minute: "2-digit", second: "2-digit", hour12: use12Hour }),
);
const dateStr = $computed(() => dateFormatter.format(props.date));
Expand Down

0 comments on commit b88fc3c

Please sign in to comment.