Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API reference improvements #175

Closed
vilanz opened this issue May 20, 2018 · 1 comment
Closed

API reference improvements #175

vilanz opened this issue May 20, 2018 · 1 comment
Labels
discussion Further discussion

Comments

@vilanz
Copy link
Contributor

vilanz commented May 20, 2018

While the API reference right now works well, I think it could be more concise, especially when it comes to method typing and some inconsistent grammar/formatting.

I can't set up a pull request right now, but these are some sketches of what I came up with (still need to find a better way to include parameter types):

Parsing

Now Dayjs

Set to the current date and time by default.

dayjs();

Dayjs parsed from other date formats Dayjs

dayjs(String);
dayjs('1995-12-25');
  • Unix Timestamp (milliseconds since the Unix Epoch - Jan 1 1970 12AM UTC)
dayjs(Number);
dayjs(1318781876406);
  • native Javascript Date object
dayjs(Date);
dayjs(new Date(2018, 8, 18));

[ ... stuff ... ]

Get + Set

Get and set date.

Year number

dayjs().year();

Month number

dayjs().month();
@iamkun
Copy link
Owner

iamkun commented May 20, 2018

Thanks. Looks good to me.

I am keep looking a good way to make our docs better and simpler.

Actually, we had a discussion before, you could check it in #75.

Still, discussions welcome.

@iamkun iamkun added the discussion Further discussion label May 20, 2018
@iamkun iamkun closed this as completed Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Further discussion
Projects
None yet
Development

No branches or pull requests

2 participants