Dates

dayjs().startOf('isoWeek').subtract(7, 'day')
dayjs().startOf('week');
dayjs().startOf('isoWeek').subtract(14, 'day');
dayjs().subtract(1, 'month').startOf('month');dayjs(
new Date(today.getFullYear(), today.getMonth() - 1, 1).toString()
);
dayjs().subtract(1, 'month').endOf('month');dayjs(
new Date(today.getFullYear(), today.getMonth(), 0).toString()
);
dayjs().subtract(2, 'month').startOf('month');dayjs(
new Date(today.getFullYear(), today.getMonth() - 2, 1).toString()
);

--

--

--

Consistency achieves everything https://github.com/paigekim29

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to use useMemo/memo to optimize performance

Scrape tweets of twitter profile easily with this simple python code

Angular Material: dark mode

checkbox like radio button jquery

Stacks on Stacks

Frontend Weekly Digest #239 (6–12 December 2021)

How to Set a Header in a Word Document using Node.JS

Sane state management in a sane frontend language (Rescript with React and MobX)

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Joo Hee Paige Kim

Joo Hee Paige Kim

Consistency achieves everything https://github.com/paigekim29

More from Medium

Ancestry Merge Trees

When Win/Win is not Win/Win

The Death of Causality

Want to be a better developer? Learn about stacks!

Diagram showing the addition of an item to the stack