format(format c)

a-antemeridiemandpostmeridiemd-dayofmonth(noleadingzero)dd-dayofmonth(twodigit)o-dayofyear(noleadingzeros)oo-dayofyear(threedigit)D-daynameshortDD-…

大家好,又见面了,我是你们的朋友全栈君。

a  - ante meridiem and post meridiem
d  - day of month (no leading zero)
dd - day of month (two digit)
o  - day of year (no leading zeros)
oo - day of year (three digit)
D  - day name short
DD - day name long
g  - 12-hour hour format of day (no leading zero)
gg - 12-hour hour format of day (two digit)
h  - 24-hour hour format of day (no leading zero)
hh - 24-hour hour format of day (two digit)
u  - millisecond of second (no leading zeros)
uu - millisecond of second (three digit)
i  - minute of hour (no leading zero)
ii - minute of hour (two digit)
m  - month of year (no leading zero)
mm - month of year (two digit)
M  - month name short
MM - month name long
S  - ordinal suffix for the previous unit
s  - second of minute (no leading zero)
ss - second of minute (two digit)
y  - year (two digit)
yy - year (four digit)
@  - Unix timestamp (ms since 01/01/1970)
!  - Windows ticks (100ns since 01/01/0001)
'...' - literal text
'' - single quote

 

$.formatDateTime("yy-mm-dd hh:ii:ss", new Date(result))

 

https://plugins.jquery.com/tag/format/

 

插件下载地址:

https://plugins.jquery.com/formatDateTime/

使用说明:

https://github.com/agschwender/jquery.formatDateTime/blob/1.1.4/README.md

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/127824.html原文链接:https://javaforall.net

(0)
上一篇 2022年4月10日 下午5:20
下一篇 2022年4月10日 下午5:20


相关推荐

  • ramdisk介绍与制作

    ramdisk介绍与制作转自 http m blog csdn net silent123go article details 一 文件系统与根文件系统 nbsp nbsp nbsp 1 文件系统 nbsp nbsp nbsp nbsp nbsp nbsp nbsp 文件系统是操作系统用于明确存储设备 常见的是磁盘 也有基于 NANDFlash 的固态硬盘 分区上的文件的存储方法和数据结构 即在存储设备上组织文件的方法 nbsp nbsp nbsp nbsp nbsp nbsp nbsp 看了这个概念如果有些懵 下面用

    2025年10月1日
    4
  • Partitioner分区过程分析

    Partitioner分区过程分析

    2022年1月9日
    50
  • 乾颐堂军哥HCIE8-BGP工作原理以及更新机制(含下一跳解析)[通俗易懂]

    乾颐堂军哥HCIE8-BGP工作原理以及更新机制(含下一跳解析)

    2022年3月12日
    47
  • linux nohup 命令详解

    linux nohup 命令详解nohup 命令及其输出文件 nohup 命令 如果你正在运行一个进程 而且希望退出账户时该进程不会结束 那么可以使用 nohup 命令 该命令可以在你退出账户 关闭终端之后继续运行相应的进程 nohup 就是不挂起的意思 nohangup 一般在 linux 下 nohup 格式 nohupcommand 或者 nohupcommand amp 这之间的差别是带 amp 的命令行 即

    2026年3月26日
    2
  • pycharm远程部署_pycharm 远程调试

    pycharm远程部署_pycharm 远程调试在这之前你要确保服务器上已经创建好虚拟环境你本地已经安装好pycharm1创建本地文件远程服务器上已经有一个文件了。现在你在本地创建一个同名文件。服务器上的虚拟环境为DrQA,所以我在本地新建一个DrQA空文件夹。2用pycharm打开空项目3配置服务器的解释器左上角File→Setting→projectxxx→pythoninterpreter点右上角的小齿轮,然后点add选择SSHInterpreter,然后在上边填上服务器的地址、usernam

    2025年6月29日
    6
  • StringBuilder用法小结

    StringBuilder用法小结publicfinalc CharSequence 一个可变的字符序列 此类提供一个与 StringBuffer 兼容的 API 但不保证同步 该类被设计用作 StringBuffer 的一个简易替换 用在字符串缓冲区被单个线程使用的时候 这种情况很普遍 如果可能 建议优先采用该

    2026年3月26日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号