Dear Mr robot,
Firstly, thanks for taking the time to write this lib, it is a good idea and has a nice, clean interface.
I hope that this testing is useful to you - I realise that it a little sparse but the following is what I consistently get with different dates. I believe it is because the string names expected in the setters here are date, month and year rather than the days, months and years suggested in the docs below.
Dear Mr robot, Firstly, thanks for taking the time to write this lib, it is a good idea and has a nice, clean interface.
I hope that this testing is useful to you - I realise that it a little sparse but the following is what I consistently get with different dates. I believe it is because the string names expected in the setters here are
date
,month
andyear
rather than thedays
,months
andyears
suggested in the docs below.I have tested this using the example code in the Docs here: https://evilcorp.limited/date-fp/docs/functions/set.html
These are my results: ` var date = new Date('2001-01-01 01:01:01.0'); // Mon Jan 01 2001 01:01:01 GMT+0000 (GMT)
var y = D.set('milliseconds', 123, date); // Mon Jan 01 2001 01:01:01 GMT+0000 (GMT)
var y = D.set('minutes', 13, date); // Mon Jan 01 2001 01:13:01 GMT+0000 (GMT)
var y = D.set('seconds', 13, date); // Mon Jan 01 2001 01:01:13 GMT+0000 (GMT)
var y = D.set('hours', 13, date); // Mon Jan 01 2001 13:01:01 GMT+0000 (GMT)
var y = D.set('days', 13, date); // Invalid Date
var y = D.set('months', 1, date); // Invalid Date
var y = D.set('years', 2015, date); // Invalid Date
// === TEST THEORY === // var y = D.set('year', 2015, date); // Thu Jan 01 2015 01:01:01 GMT+0000 (GMT) ` Tested in Chrome Canary only.