Skip to content

refactor date pattern names for clarity (when %date actually means %datetime)#1163

Merged
lamweili merged 2 commits intomasterfrom
added-pattern-alias
Jan 23, 2022
Merged

refactor date pattern names for clarity (when %date actually means %datetime)#1163
lamweili merged 2 commits intomasterfrom
added-pattern-alias

Conversation

@lamweili
Copy link
Copy Markdown
Contributor

@lamweili lamweili commented Jan 23, 2022

Fixes #1012

Reserved log4js String dateFormat Constant (and String equivalent) Output (local time)
"ISO8601"
"ISO8601_FORMAT"
dateFormat.ISO8601_FORMAT
"yyyy-MM-ddThh:mm:ss.SSS"
2017-03-14T14:10:20.391
"ISO8601_WITH_TZ_OFFSET"
"ISO8601_WITH_TZ_OFFSET_FORMAT"
dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT
"yyyy-MM-ddThh:mm:ss.SSSO"
2017-03-14T14:10:20.391+11:00
"ABSOLUTE"
"ABSOLUTETIME"
"ABSOLUTETIME_FORMAT"
dateFormat.ABSOLUTETIME_FORMAT
"hh:mm:ss.SSS"
14:10:20.391
"DATE"
"DATETIME"
"DATETIME_FORMAT"
dateFormat.DATETIME_FORMAT
"dd MM yyyy hh:mm:ss.SSS"
14 03 2017 14:10:20.391

Old reserved Strings are marked as deprecated and will remain compatible for now.

@lamweili lamweili added this to the 6.4.1 milestone Jan 23, 2022
@lamweili lamweili force-pushed the added-pattern-alias branch from f843075 to 5725bf6 Compare January 23, 2022 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pattern format and date docs

1 participant