开发者

Dynamic change of the global clock in javascript

开发者 https://www.devze.com 2023-02-17 16:44 出处:网络
I have to solve a problem that the user mustchange dynamic from global clock the time,day,date,city. Can someone help me.The different ways are:

I have to solve a problem that the user must change dynamic from global clock the time,day,date,city. Can someone help me.The different ways are: Sun Sunday

28th March 2010 28 March 2010 28th Mar 2010 28 Mar 2010 28/03/2010 28th Ma开发者_开发知识库rch 10 28 March 10 28th Mar 10 28 Mar 10 28/03/10 28th March 28 March 28th Mar 28 Mar 28/03

5:28:12 am 5:28 am 5:28:12 5:28 17:28:12 17:28

Thanks


Have you tried the Datejs library? Among great parsing features it also has a fully customizable output format. Although from your question I don't know what exactly you try to accomplish, its likely that Datejs already solves the problem.


Would using the toLocaleDateString and toLocaleTimeString options work? They would then print out the date and time values as appropriate to the user's localization settings - http://www.w3schools.com/jsref/jsref_tolocaledatestring.asp

0

精彩评论

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

关注公众号