mirror of
https://github.com/diced/zipline.git
synced 2025-04-11 23:31:17 -05:00
feat: ampm modifier for dates
This commit is contained in:
parent
1a837c02d2
commit
1816e13879
1 changed files with 4 additions and 0 deletions
|
@ -128,6 +128,10 @@ function modifier(mod: string, value: unknown, tzlocale?: string): string {
|
|||
return value.getMinutes().toString();
|
||||
case 'second':
|
||||
return value.getSeconds().toString();
|
||||
case 'ampm':
|
||||
return value.getHours() < 12 ? 'am' : 'pm';
|
||||
case 'AMPM':
|
||||
return value.getHours() < 12 ? 'AM' : 'PM';
|
||||
default:
|
||||
return '{unknown_date_modifier}';
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue