Skip to content

Commit

Permalink
fix(scully): use yyyy-mm-dd format
Browse files Browse the repository at this point in the history
  • Loading branch information
d-koppenhagen committed Jan 6, 2020
1 parent 3077854 commit 31e1ebd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion schematics/scully/src/create-markdown/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default function(options: MyServiceSchema): Rule {
? strings.dasherize(options.sourceDir) // use sourceDir when provided
: strings.dasherize(options.name); // fall back to name when not provided
const date = new Date();
const fullDay = `${date.getMonth() + 1}-${date.getDate()}-${date.getFullYear()}`;
// format yyyy-mm-dd
const fullDay = date.toISOString().substring(0, 10);
const path = `./${sourceDir}/${fullDay}-${nameDasherized}.md`;
if (!host.exists(path)) {
host.create(
Expand Down

0 comments on commit 31e1ebd

Please sign in to comment.