All Projects → deepsweet → Mnth

deepsweet / Mnth

Licence: mit
📆 Calendar month as 2d array of Dates

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Mnth

Timestamp
⏰ A better macOS menu bar clock.
Stars: ✭ 296 (+621.95%)
Mutual labels:  date, calendar
Calendarview
An Easy to Use Calendar for iOS (Swift 5.0)
Stars: ✭ 429 (+946.34%)
Mutual labels:  date, calendar
Pandas market calendars
Exchange calendars to use with pandas for trading applications
Stars: ✭ 319 (+678.05%)
Mutual labels:  date, calendar
Md Date Time Picker
An implementation of Material Design Picker components in vanilla CSS, JS, and HTML
Stars: ✭ 272 (+563.41%)
Mutual labels:  date, calendar
React Date Picker
A date picker for your React app.
Stars: ✭ 715 (+1643.9%)
Mutual labels:  date, calendar
React Native Calendar Select
A component to select period from calendar like Airbnb
Stars: ✭ 279 (+580.49%)
Mutual labels:  date, calendar
React Infinite Calendar
✨ Infinite scrolling date-picker built with React, with localization, range selection, themes, keyboard support, and more.
Stars: ✭ 3,828 (+9236.59%)
Mutual labels:  date, calendar
nepali-datetime
Python's core datetime inspired nepali datetime (BS date & NPT) package 🇳🇵
Stars: ✭ 36 (-12.2%)
Mutual labels:  date, calendar
Vue Ctk Date Time Picker
VueJS component to select dates & time, including a range mode
Stars: ✭ 707 (+1624.39%)
Mutual labels:  date, calendar
Period
PHP's time range API
Stars: ✭ 616 (+1402.44%)
Mutual labels:  date, calendar
React Daterange Picker
A date range picker for your React app.
Stars: ✭ 259 (+531.71%)
Mutual labels:  date, calendar
Table calendar
Highly customizable, feature-packed Flutter Calendar with gestures, animations and multiple formats
Stars: ✭ 897 (+2087.8%)
Mutual labels:  date, calendar
Datez
📆 Breeze through Date, DateComponents, and TimeInterval with Swift!
Stars: ✭ 254 (+519.51%)
Mutual labels:  date, calendar
React Datetime Picker
A datetime picker for your React app.
Stars: ✭ 294 (+617.07%)
Mutual labels:  date, calendar
PrimeCalendar
PrimeCalendar provides all of the java.util.Calendar functionalities for Persian, Hijri, and ... dates. It is also possible to convert dates to each other.
Stars: ✭ 45 (+9.76%)
Mutual labels:  date, calendar
Zebra datepicker
A super-lightweight, highly configurable, cross-browser date / time picker jQuery plugin
Stars: ✭ 367 (+795.12%)
Mutual labels:  date, calendar
isoweek
Go package for calculating a start date and time of ISO 8601 week. (golang)
Stars: ✭ 32 (-21.95%)
Mutual labels:  date, calendar
vuejs3-datepicker
vue 3 datepicker. supports disabling, highlighting of dates and programmatic access of date.
Stars: ✭ 23 (-43.9%)
Mutual labels:  date, calendar
Angular Moment Picker
Angular Moment Picker is an AngularJS directive for date and time picker using Moment.js.
Stars: ✭ 536 (+1207.32%)
Mutual labels:  date, calendar
Moment.php
Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Stars: ✭ 900 (+2095.12%)
Mutual labels:  date, calendar

mnth

⚠️ Project has been transferred to NexTools metarepo

npm tests coverage

Framework-agnostic base block to build calendars, datepickers, etc by rendering 2d array of Dates.

Requirements

Node

Browser

Install

$ yarn add [email protected] mnth

Usage

mnth(date, options)
  • date – Date object
  • options
    • firstDay – first day of the week, from 0 to 6, 1 by default
import { format, parse } from 'date-fns/esm'
import mnth from 'mnth'

const date = parse('2018-04-01', 'yyyy-MM-dd', new Date())
const month = mnth(date).map((week) =>
  week.map((day) => format(day, 'yyyy-MM-dd'))
)

console.log(month)
/*
[
  [ '2018-03-26', '2018-03-27', '2018-03-28', '2018-03-29', '2018-03-30', '2018-03-31', '2018-04-01' ],
  [ '2018-04-02', '2018-04-03', '2018-04-04', '2018-04-05', '2018-04-06', '2018-04-07', '2018-04-08' ],
  [ '2018-04-09', '2018-04-10', '2018-04-11', '2018-04-12', '2018-04-13', '2018-04-14', '2018-04-15' ],
  [ '2018-04-16', '2018-04-17', '2018-04-18', '2018-04-19', '2018-04-20', '2018-04-21', '2018-04-22' ],
  [ '2018-04-23', '2018-04-24', '2018-04-25', '2018-04-26', '2018-04-27', '2018-04-28', '2018-04-29' ],
  [ '2018-04-30', '2018-05-01', '2018-05-02', '2018-05-03', '2018-05-04', '2018-05-05', '2018-05-06' ]
]
*/
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].