Closed alFReD-NSH closed 6 years ago
Sorry to be so late on this one... this one's a little mixed up though... considering you were expecting the date to be in the past I think you mean:
const { Date } = require('sugar-date');
const date = new Date('14 aug 2017');
date.get('Saturday'); // Case 1
date.get('Saturday', { past: true }); // Case 2
As you had it in case 1, I am showing that it returns 2017-08-19
, which is expected. However case 2 is also returning 2017-08-19
which is a bug (#620). In any case this would be using past
not future
as the title of this ticket. In any case I've fixed the bug, so I'm going to close this one as a duplicate. Please feel free to re-open if there's some other aspect of this issue I'm missing... Thanks!
It should instead return 5th August, not 12th. I can't reproduce it on other dates though.