Created
February 25, 2014 11:51
-
-
Save kaicode/9207511 to your computer and use it in GitHub Desktop.
This file contains 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
function getMonday() { | |
var date = new Date(); | |
// Set date to Monday just gone | |
var day = date.getDay() | |
date.setDate(date.getDate() - (day == 0 ? -6:1)); | |
// Zero time | |
date.setHours(0); | |
date.setMinutes(0); | |
date.setSeconds(0); | |
date.setMilliseconds(0); | |
return date.toISOString(); | |
} | |
new TimeBasedCountingWidget({ | |
targetClassName: 'money-since-start', | |
startDate: getMonday(), | |
countMultiplier: 57, | |
counttype:'money', | |
prefix: '<span class="sign">£</span>' | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment