From 2027e07a1f9e6c213d24be90d2a9534246a3bb06 Mon Sep 17 00:00:00 2001 From: David Wu Date: Tue, 26 Dec 2017 17:56:24 +0100 Subject: [PATCH 1/2] Create tomorrow.md --- snippets/tomorrow.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 snippets/tomorrow.md diff --git a/snippets/tomorrow.md b/snippets/tomorrow.md new file mode 100644 index 000000000..7203d0ef8 --- /dev/null +++ b/snippets/tomorrow.md @@ -0,0 +1,9 @@ +### tomorrow + +Results in a string representation of tomorrow's date. +Use `new Date()` to get today's date, adding `86400000` of seconds to it(24 hours), using `toISOString` to convert Date object to string. + +```js +const tomorrow = () => new Date(new Date() + 86400000).toISOString().split('T')[0]; +// tomorrow() -> 2017-12-26 +``` From 7ff3ffb7164d6794b64f9512f21e5924f42ef4bf Mon Sep 17 00:00:00 2001 From: David Wu Date: Tue, 26 Dec 2017 17:57:15 +0100 Subject: [PATCH 2/2] Update tag_database --- tag_database | 1 + 1 file changed, 1 insertion(+) diff --git a/tag_database b/tag_database index 86752f933..16ef2aa26 100644 --- a/tag_database +++ b/tag_database @@ -125,6 +125,7 @@ toCamelCase:string toDecimalMark:utility toEnglishDate:date toKebabCase:string +tomorrow:date toOrdinalSuffix:utility toSnakeCase:string truncateString:string