Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First implementation of format() #1

Merged
merged 7 commits into from Oct 13, 2014
Merged

Conversation

dolbyzerr
Copy link
Contributor

No description provided.


describe('startOfYear', function() {
it('returns date with time setted to 00:00:00', function() {
var date = new Date('2014-09-02T11:55:00');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better to use new Date(2014, 8, 2) because in some cases tests may fail because of time zone difference:

new Date('2014-09-02T11:55:00').toISOString();
//=> '2014-09-02T11:55:00.000Z'
new Date(2014, 8, 2, 11, 55, 0).toISOString();
//=> '2014-09-02T07:55:00.000Z'

In this particular case it doesn't matter, but better to keep consistency for new code.

kossnocorp added a commit that referenced this pull request Oct 13, 2014
First implementation of format()
@kossnocorp kossnocorp merged commit 3de849a into date-fns:master Oct 13, 2014
@kossnocorp
Copy link
Member

Published as v0.10.0

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.

None yet

2 participants