http://gengns.com/wp-content/uploads/2015/05/logo-onepage-300x66.png00Génesishttp://gengns.com/wp-content/uploads/2015/05/logo-onepage-300x66.pngGénesis2018-05-11 14:48:472018-05-11 14:48:47Select last day of the month for a specific date
const date = new Date()
date.toLocaleTimeString()
//’16:18:43′
date.toLocaleDateString()
//’15/5/2018′
new Date(date.getFullYear(), date.getMonth() + 1, 1).toISOString().slice(0, 10)
//’2018-06-01′ ???
Génesis says:
Long time, no see! ^^ What are u doing there? Did you get a scholarship?
I tested in FF and Chrome and it works, even I launched Chromium with faketime in the terminal and it’s ok.
Which browser and version are you using?
japanfever says:
i have family in Los Angeles. in my laptop with Tokyo timezone it works, i’think it only works for some time zones … it’s very easy 2b a troll with you .. your implementation is not very good. something like that is better:
let now = new Date()
let year = now.getFullYear()
let month = now.getMonth()
console.log((new Date(Date.UTC(year,month+1,1)-86400000)).toISOString().slice(0,10))
what is `Chromium with faketime`? i use `Firefox Quantum 60.0`, the best browser!!!
Génesis says:
Hope you are having a great time there!
– Chromium is the open-source browser behind Chrome.
– faketime lets you change the time of applications.
I use both FF and Chromium (never Chrome) but yes they sped up FireFox a lot with Quantum.
//Here in Los Angeles it does not work:
const date = new Date()
date.toLocaleTimeString()
//’16:18:43′
date.toLocaleDateString()
//’15/5/2018′
new Date(date.getFullYear(), date.getMonth() + 1, 1).toISOString().slice(0, 10)
//’2018-06-01′ ???
Long time, no see! ^^ What are u doing there? Did you get a scholarship?
I tested in FF and Chrome and it works, even I launched Chromium with faketime in the terminal and it’s ok.
Which browser and version are you using?
i have family in Los Angeles. in my laptop with Tokyo timezone it works, i’think it only works for some time zones … it’s very easy 2b a troll with you .. your implementation is not very good. something like that is better:
let now = new Date()
let year = now.getFullYear()
let month = now.getMonth()
console.log((new Date(Date.UTC(year,month+1,1)-86400000)).toISOString().slice(0,10))
what is `Chromium with faketime`? i use `Firefox Quantum 60.0`, the best browser!!!
Hope you are having a great time there!
– Chromium is the open-source browser behind Chrome.
– faketime lets you change the time of applications.
I use both FF and Chromium (never Chrome) but yes they sped up FireFox a lot with Quantum.