Last active
June 24, 2016 17:49
-
-
Save scumola/fa9fefdb1ecb87c83d768d6ffe200fee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var filedate = moment(response.headers["Last-Modified"]); | |
var now = moment().subtract(1000, 'seconds'); | |
assert(filedate.isBefore(now), "file is > 1000 seconds old"); | |
This doesn't seem to work either - always asserts that the file is old. | |
var filedate = moment(response.headers["Last-Modified"]); | |
var now = moment(); | |
assert(filedate.isBefore(now.subtract(100000, 'seconds')), "file is > 100000 seconds old"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment