Module "date/parser/date_format_query"
Variables
Const DateFormatQueryList
Date
FormatQueryList: DateFormatQuery[] = [new DateFormatQuery({name: {jp: ['スラッシュ', //'コロン',],},extra: [{ key: 'type', value: 'slash' }],}),new DateFormatQuery({name: {jp: ['ハイフン', //],},extra: [{ key: 'type', value: 'hyphen' }],}),new DateFormatQuery({name: {jp: ['ISO8601', //'ISO','アイエスオー',],},extra: [{ key: 'type', value: 'iso' }],}),new DateFormatQuery({name: {jp: ['日本語', //'漢字',],},extra: [{ key: 'type', value: 'japanese' }],}),new DateFormatQuery({name: {jp: ['和暦', //'令和','平成','昭和','大正','明治',],},extra: [{ key: 'format.year', value: 'w' },{ key: 'type', value: 'japanese' },],}),new DateFormatQuery({name: {jp: ['区切りなし', //'区切り文字なし','数字','区切らない',],},extra: [{ key: 'type', value: 'none' }],}),new DateFormatQuery({name: {jp: ['年', //],},extra: [{ key: 'unit.year', value: 'true' }],}),new DateFormatQuery({name: {jp: ['月', //],},extra: [{ key: 'unit.month', value: 'true' }],}),new DateFormatQuery({name: {jp: ['日', //],},extra: [{ key: 'unit.date', value: 'true' }],}),new DateFormatQuery({name: {jp: ['時', //],},extra: [{ key: 'unit.hour', value: 'true' }],}),new DateFormatQuery({name: {jp: ['分', //],},extra: [{ key: 'unit.minute', value: 'true' }],}),new DateFormatQuery({name: {jp: ['秒', //],},extra: [{ key: 'unit.second', value: 'true' }],}),new DateFormatQuery({name: {jp: ['ミリ秒', //],},extra: [{ key: 'unit.millisecond', value: 'true' }],}),new DateFormatQuery({name: {jp: ['曜日', //],},extra: [{ key: 'unit.weekday', value: 'true' }],}),new DateFormatQuery({name: {jp: ['エポック', //'ユニックス','エポック秒','ユニックス時間','ユニックスタイム',],},extra: [{ key: 'unit.epoch', value: 'true' }],}),new DateFormatQuery({name: {jp: ['エポックミリ', 'エポックミリ秒'],},extra: [{ key: 'unit.epoch_ms', value: 'true' }],}),]
Functions
appendFormat
- appendFormat(unit: string, format_text: string, value: string, should_write_prefix: boolean): string
-
Parameters
-
unit: string
-
format_text: string
-
value: string
-
should_write_prefix: boolean
Returns string
配列から日時フォーマットを追加する