如何使用 Javascript 检查用户是否使用 12 小时或 24 小时时间格式,无论是否使用像 moment.js 这样的第三方库我也尝试过,new Date().toLocaleString()但它没有在 Firefox 和 google chrome 中进行测试。firefox 始终显示 12 小时格式,chrome 始终显示 24 小时时间格式
new Date().toLocaleString()
javascript browser time-format datetime-format
browser ×1
datetime-format ×1
javascript ×1
time-format ×1