Started working on getting the time logged today.
This commit is contained in:
@@ -15,6 +15,8 @@ var config = {
|
||||
currentUserApiUrl: 'https://wakatime.com/api/v1/users/current',
|
||||
// The url to logout the user from wakatime
|
||||
logoutUserUrl: 'https://wakatime.com/logout',
|
||||
// Gets stats from the WakaTime API
|
||||
summariesApiUrl: 'https://wakatime.com/api/v1/users/current/summaries',
|
||||
// Different colors for different states of the extension
|
||||
colors: {
|
||||
allGood: '',
|
||||
|
||||
13
assets/js/helpers/getTodaysDateInFormat.js
Normal file
13
assets/js/helpers/getTodaysDateInFormat.js
Normal file
@@ -0,0 +1,13 @@
|
||||
function getTodaysDateInFormat()
|
||||
{
|
||||
var today = new Date();
|
||||
var month = today.getMonth() + 1;
|
||||
var date = today.getDate();
|
||||
|
||||
if(month < 10) month = '0' + month;
|
||||
if(date < 10) date = '0' + date;
|
||||
|
||||
return today.getFullYear() + '-' + month + '-' + date;
|
||||
}
|
||||
|
||||
export default getTodaysDateInFormat;
|
||||
Reference in New Issue
Block a user