npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dfeidao/fd-an000054

v4.6.201909200944

Published

获取一天的开始时间

Readme

获取一天的开始时间

Installation

yarn add --dev @dfeidao/fd-an000054

时间格式

| 单位 | 格式 | 示例 | |--------------------------------|-------|---------------------------------------| | 公元 | G..GGG | AD, BC | | | GGGG | Anno Domini, Before Christ | | | GGGGG | A, B | | 年 | y | 44, 1, 1900, 2017 | | | yo | 44th, 1st, 0th, 17th | | | yy | 44, 01, 00, 17 | | | yyy | 044, 001, 1900, 2017 | | | yyyy | 0044, 0001, 1900, 2017 | | | yyyyy | ... | | Local week-numbering year | Y | 44, 1, 1900, 2017 | | | Yo | 44th, 1st, 1900th, 2017th | | | YY | 44, 01, 00, 17 | | | YYY | 044, 001, 1900, 2017 | | | YYYY | 0044, 0001, 1900, 2017 | | | YYYYY | ... | | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | | | RR | -43, 00, 01, 1900, 2017 | | | RRR | -043, 000, 001, 1900, 2017 | | | RRRR | -0043, 0000, 0001, 1900, 2017 | | | RRRRR | ... | | Extended year | u | -43, 0, 1, 1900, 2017 | | | uu | -43, 01, 1900, 2017 | | | uuu | -043, 001, 1900, 2017 | | | uuuu | -0043, 0001, 1900, 2017 | | | uuuuu | ... | | 刻 | Q | 1, 2, 3, 4 | | | Qo | 1st, 2nd, 3rd, 4th | | | QQ | 01, 02, 03, 04 | | | QQQ | Q1, Q2, Q3, Q4 | | | QQQQ | 1st quarter, 2nd quarter, ... | | | QQQQQ | 1, 2, 3, 4 | | Quarter (stand-alone) | q | 1, 2, 3, 4 | | | qo | 1st, 2nd, 3rd, 4th | | | qq | 01, 02, 03, 04 | | | qqq | Q1, Q2, Q3, Q4 | | | qqqq | 1st quarter, 2nd quarter, ... | | | qqqqq | 1, 2, 3, 4 | | 月 | M | 1, 2, ..., 12 | | | Mo | 1st, 2nd, ..., 12th | | | MM | 01, 02, ..., 12 | | | MMM | Jan, Feb, ..., Dec | | | MMMM | January, February, ..., December | | | MMMMM | J, F, ..., D | | Month (stand-alone) | L | 1, 2, ..., 12 | | | Lo | 1st, 2nd, ..., 12th | | | LL | 01, 02, ..., 12 | | | LLL | Jan, Feb, ..., Dec | | | LLLL | January, February, ..., December | | | LLLLL | J, F, ..., D | | 一年中的第几周 | w | 1, 2, ..., 53 | | | wo | 1st, 2nd, ..., 53th | | | ww | 01, 02, ..., 53 | | ISO week of year | I | 1, 2, ..., 53 | | | Io | 1st, 2nd, ..., 53th | | | II | 01, 02, ..., 53 | | 一月中的第几天 | d | 1, 2, ..., 31 | | | do | 1st, 2nd, ..., 31st | | | dd | 01, 02, ..., 31 | | 一年中的第几天 | D | 1, 2, ..., 365, 366 | | | Do | 1st, 2nd, ..., 365th, 366th | | | DD | 01, 02, ..., 365, 366 | | | DDD | 001, 002, ..., 365, 366 | | | DDDD | ... | | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Su | | | EEEE | Monday, Tuesday, ..., Sunday | | | EEEEE | M, T, W, T, F, S, S | | | EEEEEE | Mo, Tu, We, Th, Fr, Su, Sa | | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | | | io | 1st, 2nd, ..., 7th | | | ii | 01, 02, ..., 07 | | | iii | Mon, Tue, Wed, ..., Su | | | iiii | Monday, Tuesday, ..., Sunday | | | iiiii | M, T, W, T, F, S, S | | | iiiiii | Mo, Tu, We, Th, Fr, Su, Sa | | 一周中的第几天 | e | 2, 3, 4, ..., 1 | | | eo | 2nd, 3rd, ..., 1st | | | ee | 02, 03, ..., 01 | | | eee | Mon, Tue, Wed, ..., Su | | | eeee | Monday, Tuesday, ..., Sunday | | | eeeee | M, T, W, T, F, S, S | | | eeeeee | Mo, Tu, We, Th, Fr, Su, Sa | | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | | | co | 2nd, 3rd, ..., 1st | | | cc | 02, 03, ..., 01 | | | ccc | Mon, Tue, Wed, ..., Su | | | cccc | Monday, Tuesday, ..., Sunday | | | ccccc | M, T, W, T, F, S, S | | | cccccc | Mo, Tu, We, Th, Fr, Su, Sa | | 上午, 下午 | a..aaa | AM, PM | | | aaaa | a.m., p.m. | | | aaaaa | a, p | | 上午, 下午, 中午, 子夜 | b..bbb | AM, PM, noon, midnight | | | bbbb | a.m., p.m., noon, midnight | | | bbbbb | a, p, n, mi | | Flexible day period | B..BBB | at night, in the morning, ... | | | BBBB | at night, in the morning, ... | | | BBBBB | at night, in the morning, ... | | 小时 [1-12] | h | 1, 2, ..., 11, 12 | | | ho | 1st, 2nd, ..., 11th, 12th | | | hh | 01, 02, ..., 11, 12 | | 小时 [0-23] | H | 0, 1, 2, ..., 23 | | | Ho | 0th, 1st, 2nd, ..., 23rd | | | HH | 00, 01, 02, ..., 23 | | 小时 [0-11] | K | 1, 2, ..., 11, 0 | | | Ko | 1st, 2nd, ..., 11th, 0th | | | KK | 1, 2, ..., 11, 0 | | 小时 [1-24] | k | 24, 1, 2, ..., 23 | | | ko | 24th, 1st, 2nd, ..., 23rd | | | kk | 24, 01, 02, ..., 23 | | 分钟 | m | 0, 1, ..., 59 | | | mo | 0th, 1st, ..., 59th | | | mm | 00, 01, ..., 59 | | 秒 | s | 0, 1, ..., 59 | | | so | 0th, 1st, ..., 59th | | | ss | 00, 01, ..., 59 | | Fraction of second | S | 0, 1, ..., 9 | | | SS | 00, 01, ..., 99 | | | SSS | 000, 0001, ..., 999 | | | SSSS | ... | | 时区 (ISO-8601 w/ Z) | X | -08, +0530, Z | | | XX | -0800, +0530, Z | | | XXX | -08:00, +05:30, Z | | | XXXX | -0800, +0530, Z, +123456 | | | XXXXX | -08:00, +05:30, Z, +12:34:56 | | 时区 (ISO-8601 w/o Z) | x | -08, +0530, +00 | | | xx | -0800, +0530, +0000 | | | xxx | -08:00, +05:30, +00:00 | | | xxxx | -0800, +0530, +0000, +123456 | | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | | 时区 (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | | 时区 (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | | 以秒为单位的时间戳 | t | 512969520 | | | tt | ... | | 以毫秒为单位的时间戳 | T | 512969520900 | | | TT | ... | | Long localized date | P | 5/29/53 | | | PP | May 29, 1453 | | | PPP | May 29th, 1453 | | | PPPP | Sunday, May 29th, 1453 | | Long localized time | p | 12:00 AM | | | pp | 12:00:00 AM | | | ppp | 12:00:00 AM GMT+2 | | | pppp | 12:00:00 AM GMT+02:00 | | Combination of date and time | Pp | 5/29/53, 12:00 AM | | | PPpp | May 29, 1453, 12:00 AM | | | PPPppp | May 29th, 1453 at ... | | | PPPPpppp | Sunday, May 29th, 1453 at ... |

Example

import an54 from '@dfeidao/fd-an000054';
const now_date = new Date().getTime(); // 1551168254155
const new_date = an54(now_date);  // 1551110400000