开发者

How to fetch UTC dates with JavaScript?

开发者 https://www.devze.com 2022-12-26 20:27 出处:网络
I want to get the current UTC date with 开发者_运维技巧Javascript. How can I do this? There seems to be methods for getting the time in UTC:

I want to get the current UTC date with 开发者_运维技巧Javascript. How can I do this? There seems to be methods for getting the time in UTC:

date.getUTCHours();

How can I get the date?


There are UTC getters for date, day, full year, hour, minutes, month, etc. To get the date specifically, you might find getUTCDate useful.

Without seeing more of your code, I can only suggest this:

date.getUTCDate();
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号