Skip to content

Commit

Permalink
Add week number
Browse files Browse the repository at this point in the history
  • Loading branch information
maximbaz committed Nov 2, 2017
1 parent 0eae444 commit 4cc2684
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/formatter.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 46,10 @@ const OUTPUT_FORMAT = {
FULL: {
title: 'Full date and time ({{TIMEZONE}})',
format: 'LLLL'
},
WEEK: {
title: 'Week number ({{TIMEZONE}})',
format: '[Week] w'
}
}

Expand Down
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 47,8 @@ const plugin = ({ term, display, actions }) => {
OUTPUT_FORMAT.ISO,
OUTPUT_FORMAT.TIMESTAMP_MS,
OUTPUT_FORMAT.TIMESTAMP_NS,
OUTPUT_FORMAT.TIMESTAMP
OUTPUT_FORMAT.TIMESTAMP,
OUTPUT_FORMAT.WEEK
];
break;
case INPUT_FORMAT.NOW:
Expand All @@ -61,7 62,8 @@ const plugin = ({ term, display, actions }) => {
OUTPUT_FORMAT.SHORT,
OUTPUT_FORMAT.LONG,
OUTPUT_FORMAT.FULL,
OUTPUT_FORMAT.ISO
OUTPUT_FORMAT.ISO,
OUTPUT_FORMAT.WEEK
];
break;
}
Expand Down

0 comments on commit 4cc2684

Please sign in to comment.