Skip to content

Show formatted dates as comments.#47

Open
bkuker wants to merge 6 commits intogildas-lormeau:masterfrom
bkuker:master
Open

Show formatted dates as comments.#47
bkuker wants to merge 6 commits intogildas-lormeau:masterfrom
bkuker:master

Conversation

@bkuker
Copy link
Copy Markdown

@bkuker bkuker commented Jan 9, 2015

I try to guess that a value is a Date:

  • Numbers that look like seconds or millis between Jan 1 2000 and Jan 1 2038
  • Strings that look like they came from JSON.stringify({'now': new Date()})
    and then include GMT and Locale formatted versions, as comments, in the formatted JSON.

I realize that the comment is not valid JSON, but it's not too far off, a user could likely still copy & paste the formatted output into most things.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant