【发布时间】:2012-02-11 21:28:32
【问题描述】:
如何以 12 小时格式 (AM/PM) 显示 JavaScript 日期时间对象?
【问题讨论】:
-
不要浪费你的时间stackoverflow.com/a/17538193/3541385它的工作..
-
@Ritesh
WARNING: toLocaleTimeString() may behave differently based on region / location.测量两次,切割一次。 -
@AbandonedCart 这真的是一种说法吗?
-
@gilbert-v
One should double-check one's measurements for accuracy before cutting a piece of wood; otherwise it may be necessary to cut again, wasting time and material.不过,这个问题最好在 Google 上问。 -
我将永远习惯于尝试在 JavaScript 中处理简单的日期是多么令人费解。 ??????
标签: javascript datetime date time format