跳转到内容

Template:JULIANDAY.TIMESTAMP/doc

维基百科,自由的百科全书

This template takes a Julian day number and returns the date and time in same format generated by {{CURRENTTIMESTAMP}} magic word. The output of this template can then be formatted via the {{#time:}} parser function, which does not directly accept Julian day numbers.

Usage

[编辑]
  • Usage: {{JULIANDAY.TIMESTAMP|2454834.086875}}
  • Output: 20090102140506

Formatting: date only

[编辑]
  • Usage: {{#time: D. Y-m-d | {{JULIANDAY.TIMESTAMP|2454834.086875}} }}
  • Output: 五. 2009-01-02
  • Usage: {{#time: l, j F Y | {{JULIANDAY.TIMESTAMP|2454834.086875}} }}
  • Output: 星期五, 2 1月 2009
  • Usage: {{uc:{{#time: j M Y | {{JULIANDAY.TIMESTAMP|2454834.086875}} }}}}
  • Output: 2 1月 2009

Formatting: date and time

[编辑]
  • Usage: {{#time: Y-m-d H:i:s | {{JULIANDAY.TIMESTAMP|2454834.086875}} }}
  • Output: 2009-01-02 14:05:06
  • Usage: {{#time: j F Y, g:i:s a | {{JULIANDAY.TIMESTAMP|2454834.086875}} }}
  • Output: 2 1月 2009, 2:05:06 pm

See also

[编辑]