D3.time.format Time Mode

Source: Internet
Author: User
var time = new Date (0, +);   2017.1.19 Thursday
var format = D3.time.format ('%a ');
Console.log (time);  Thu Jan 00:00:00 gmt+0800 (China Standard Time)
Console.log (' Week ', format);    Thu

%a: Abbreviation of the Week//Thu
%A: Full name of the Week//Thursday

%B: The abbreviation of the month//Jan
%B: Full name of the month//January

%d: Number of days in the month, less than 2 bits with 0 complement [01, 31]
%e: Number of days in the month, less than 2 spaces complete with blanks [1, 31]

%H: Hours, 24-hour system [00, 23]
%I: Hours, 12-hour system [01, 12]

%j: Number of days in the year [001, 366]
%M: Month [01, 12]
%M: minutes [00, 59]
%l: Ms [000, 999]
%p:am or PM
%s: seconds [00, 60]
%x: Date part, equivalent to "%m%d%y"
%x: Time part, equivalent to "%h:%m:%s"
%y: Year without epoch [00, 99]
%Y: a 4-digit year that contains a chronological number

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.