vscode-faker icon indicating copy to clipboard operation
vscode-faker copied to clipboard

Specify fake date format

Open chocoelho opened this issue 7 years ago • 3 comments

It'd be good to be able to specify date format in a way similar to jsynowiec/vscode-insertdatestring.

chocoelho avatar Jan 10 '18 21:01 chocoelho

@chocoelho Hi carlos, interesting feature request. Will figure it out.

deerawan avatar Jan 20 '18 00:01 deerawan

If you're taking suggestions I was thinking about this.

Add the following options:

  • date.past.formatted
  • date.recent.formatted
  • date.future.formatted

Each would ask for additional input, a string pattern, and return the date formatted in that style.

This can be done by incorporating a library like date-format which already parses date patterns provided as strings.

jwschram avatar Oct 21 '19 05:10 jwschram

nice suggestion @jwschram. 👍

I just found out that the lib doesn't support date formatting https://github.com/Marak/faker.js/issues/601

deerawan avatar Apr 20 '20 12:04 deerawan