get-nepday-of-week
Get nepali day of week from Date object or index (with 0 for Sunday and so on)
Last updated 5 years ago by techgaun .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install get-nepday-of-week 
SYNC missed versions from official npm registry.

get-nepday-of-week Build Status

Get nepali day of week from Date object or index (with 0 for Sunday and so on)

Install

$ npm install --save get-nepday-of-week

Usage

Note: If no argument is passed, the dayOfWeek for current day is returned.

var getNepdayOfWeek = require('get-nepday-of-week');

getNepdayOfWeek(new Date('2015/10/24'))
//=>{ full: 'शनिवार', short: 'शनि', min: 'श' }

getNepdayOfWeek({"lang": "en"})
//=>{ full: 'Aaitabaar', short: 'Aaita', min: 'Aai' }

getNepdayOfWeek(2)
//=>{ full: 'मगलवार', short: 'मगल', min: 'म' }

getNepdayOfWeek(1, {"lang": "ne", "type": "short"})
//=>सोम

getNepdayOfWeek(-2)
//=>[RangeError: Expected the value of inp between 0-6]

API

getNepdayOfWeek([input], [options])

input

Type: Date or Number

Range: 0-6 if Number with 0 for Sunday/Aaitabaar and so on.

options

lang

Type: string Default: ne

type

Type: string Possible values: full (eg. Aaitabaar), short (eg. Aaita), min (eg. Aai)

License

MIT © techgaun

Current Tags

  • 0.1.4                                ...           latest (5 years ago)

5 Versions

  • 0.1.4                                ...           5 years ago
  • 0.1.3                                ...           5 years ago
  • 0.1.2                                ...           5 years ago
  • 0.1.1                                ...           5 years ago
  • 0.1.0                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (3)
Dependents (1)

Copyright 2014 - 2016 © taobao.org |