Skip to content

Commit

Permalink
Merge pull request #7 from maximbaz/add_week_number
Browse files Browse the repository at this point in the history
Add week number
  • Loading branch information
benoitzohar authored Nov 2, 2017
2 parents 0eae444 4cc2684 commit 6d0d522
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 6d0d522

Please sign in to comment.