Git Product home page Git Product logo

pholiday's Introduction

pholiday

A persian calendar holidays library for javascript based on moment-jalaali.

Online demo and Working api

pholiday api

installation

You can use this library in envs like nodejs, webpack and browserify.

$ npm install pholiday

Library is based on moment-jalaali so it has all methods moment and moment-jalaali has.

library specific methods

.isHoliday()

Check the selected date is holiday in Iran or not.

const pholiday = require('pholiday')
pholiday().isHoliday()
pholiday('1391/12/29', 'jYYYY/jMM/jDD').isHoliday() -> true
pholiday('2013-8-25 16:40:00', 'YYYY-M-D HH:mm:ss').endOf('jMonth').isHoliday() -> false

.events()

Get the selected dates events in Iran calendar.

const pholiday = require('pholiday')
pholiday().events()
pholiday('2013-8-25 16:40:00', 'YYYY-M-D HH:mm:ss').endOf('jMonth').events()
-> [ { isHoliday: false,
    event: 'گاهنبار پَتیَه‌شَهیم، جشن پایان تابستان' } ]

pholiday's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pholiday's Issues

How can get all holidays a year?

Hi, thank you for this API
with this QNetworkRequest request(QUrl("https://pholiday.herokuapp.com/date/1398-3-5/holiday"));
I can query an specific date in persian calendar ,how can I get list of all holidays a year ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.