Giter VIP home page Giter VIP logo

pdate's Introduction

pDate

Build Status

pDate is a persian (jalali,shamsi,hijri) date class that trying to be fully compatible with original Date class for using in browser or in the server with nodejs

Installation

regular :

just download pdate.min.js

using bower :

bower install --save

Usage in client

add main js file to the page

<script src="pdate.min.js"></script>

change browers default date to persian date :

window.Date = pDate;
p = new Date("1394/02/20 13:15:06");
console.log(p.toLocaleString());
//1394/02/20 13:15:06

p = new Date();
console.log(p.toLocaleString());
//would be your current date and time in persian calendar

with this type of usage you change the default built in date to persian date , many of built in functions will be available and works in persian dates too

or use as a seperate date object using pDate global object

p = new pDate();
p.toLocaleString();

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.