• Stars
    star
    129
  • Rank 279,262 (Top 6 %)
  • Language
    JavaScript
  • Created about 10 years ago
  • Updated about 10 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

中国农历 (Nong Li)

nong spm version


农历日期(Nong Li Date)

INSTALL

$ spm install nong --save

USAGE

var Nong = require('nong');
var nongli_from_gongli = new Nong(new Date()); // 今天所对应的农历日期。
var nongli_from_dt = new Nong(1983, 1, 1); // 农历一九八三年正月初一日。
var nongli_from_zh = new Nong("1983-01-01"); // 农历一九八三年正月初一日。
var nongli_from_zh = new Nong("1983/01/01"); // 农历一九八三年正月初一日。
var nongli_from_zh = new Nong("一九八三年正月初一"); // 农历一九八三年正月初一日。
var nongli_from_zh = new Nong("二〇〇九年闰五月初一"); // 农历二〇〇九年闰五月初一日。

API

Nong()

现在的农历日。

Nong(Date date)

通过公历生成农历日。

Nong(Number year, Number month, Number date, leap)

通过指定农历日期生成农历日。

Nong(String nong)

通过农历字符串生成农历日。

Number nong.getYear()

返回农历日的年份。

Number nong.getFullYear()

nong.getYear()

Number nong.getMonth()

返回农历日的月份,[0,11]

Number nong.getDate()

返回农历日的日期,[1,30]

Boolean nong.isLeap()

返回当前农历日是否属于闰月。

Number nong.getDay()

返回农历日的星期数,[0,6]

String nong.getHours()

返回农历日的小时,子丑寅卯辰巳午未申酉戌亥

String nong.getMinutes()

返回农历日的分钟数。

String nong.getSeconds()

String.getMilllseconds()

Number getTime()

返回农历日距计算机元年(1970年 1月 1日)的毫秒数。

Number Nong.parse(String nong)

解析一个农历字符串,并返回该农历日距计算机元年(1970年 1月 1日)的毫秒数。

nong.setYear(Number year)

设置农历日的年份。

nong.setFullYear(Number nong)

nong.setYear()

nong.setMonth(Number month)

设置农历日的月份。

nong.setDate(Number date)

设置农历日的日期。

nong.setHours()

设置农历日的时间。

nong.setMinutes()

设置农历日的分钟。

nong.setSeconds()

设置农历日的秒数。

nong.setMilliseconds()

设置农历日的毫秒数。

nong.toString([String format])

生成农历日的格式化字符串。

nong.valueOf()

得到农历日的距离计算机元年的毫秒数。

More Repositories

1

pinyin

🇨🇳 汉字拼音 ➜ hàn zì pīn yīn
JavaScript
7,048
star
2

detector

🐶 客户端环境识别模块。(UserAgent detector)
JavaScript
884
star
3

pangu.vim

『盘古之白』中文排版自动规范化的 Vim 插件
Vim Script
328
star
4

markline

Ⓜ️ Timeline via Markdown.
JavaScript
162
star
5

rime

闲耘的 rime 输入法配置
Makefile
98
star
6

gitlab-notifications

👍 Notifications Center for GitLab
58
star
7

gitplus

🔀 git+ is a hack of git, smart for you.
JavaScript
57
star
8

gitopen

🔀 Open git/hg/svn remote url via web browser from terminal.
JavaScript
43
star
9

obsidian-markline

Markline: Markdown timeline view in Obsidian.
TypeScript
24
star
10

unistring

Unicode String for JavaScript
TypeScript
23
star
11

template.vim

Smart load template for Vim.
Vim Script
18
star
12

rm-trash

rm-trash is utility for safely remove files in Termail.app of macOS.
Shell
18
star
13

hongbao

叫花不理红包
18
star
14

vim-desktop-calendar

Printable Vim desktop Calendar 2024
17
star
15

versioning

Semantic Versioning Number Compare
JavaScript
14
star
16

lcal

lcal: 农历事件自动生成器 (Lunar Calender)
JavaScript
12
star
17

jsgf.vim

Improved `gf` for JavaScript, TypeScript and package.json.
Vim Script
11
star
18

hotoo.github.io

HTML
11
star
19

vimlide

Vimlide: Vim-like HTML(5) Slide.
JavaScript
10
star
20

chrommon.js

A Module Loader for Google Chrome Extensions.
JavaScript
9
star
21

url

Uniform Resource Locator.
JavaScript
9
star
22

Vimmer

Vim user contact list.
8
star
23

star

Star
JavaScript
7
star
24

vimwiki-to-markdown

Convert Vimwiki to Markdown
JavaScript
7
star
25

apassword

移动端密码控件
JavaScript
7
star
26

spm-build-deps

Build project all deps
JavaScript
7
star
27

jstidy

Javascript tidy (Lexical analysis, Syntax Analysis, Semantic Analysis, Formatter, Compression, Outline view)
C++
7
star
28

kissy-editor

KISSY Rich-Text Editor
JavaScript
6
star
29

vimkey

Vim-like key mapping
JavaScript
6
star
30

Edit-with-Vim-tabs

Edit with Vim tabs
6
star
31

perf-javascript-error

Performance test for JavaScript Error.
JavaScript
5
star
32

jobs

🐜 蚂蚁集团・数字金融技术部招聘
5
star
33

markdown.vim

5
star
34

rhythmaware

节奏感知器:根据用户的输入速度自动感知停顿状态。
JavaScript
5
star
35

eggjs-gf.vim

goto file for eggjs( support router, controllers, services, proxy, enums)
Vim Script
4
star
36

round-percent

Round Percent Widget
JavaScript
4
star
37

BaiduIndexAPI.java

第三方百度指数 API (Java版)
Java
4
star
38

js2json

Convert JavaScript Object to JSON format.
JavaScript
4
star
39

smartree

Smart Tree
JavaScript
4
star
40

blog

 · 闲耘™・博客
JavaScript
3
star
41

jsonmatter

JSON formatter tool by stream.
JavaScript
3
star
42

orderby

SQL like sort function.
JavaScript
3
star
43

blacklint

Check certain words.
Shell
3
star
44

highlight-cursor-word.vim

Highlight words which under text-cursor(caret) for Vim.
Vim Script
3
star
45

echo

Echo for Web UI, a replicator.
JavaScript
3
star
46

life

@hotoo's life line. A sample for use [markline](https://github.com/hotoo/markline).
Makefile
3
star
47

hundun

盘古之白,浑沌之初。
JavaScript
3
star
48

csspretty.vim

Vim Script
3
star
49

gitruth

Clean Git Files Forever.
Shell
3
star
50

firebug-lite-ie

Firebug Lite for IE.
3
star
51

chinese-lunar-calendar

中国农历
3
star
52

gaegtalk

基于gae和gtalk群聊服务
Python
2
star
53

Jumsoft-Money-zh_CN.lproj

Jumsoft Money 简体中文语言包。
2
star
54

Doit.vim

Vim plugin for Doit.im
2
star
55

fastclone

The fast clone way
JavaScript
2
star
56

linkage

无限级联动
JavaScript
2
star
57

seajs-gettext

GNU `gettext` like for seajs.
JavaScript
2
star
58

hotoo

1
star
59

scripts

很久之前在 Google Code 上备份的代码
JavaScript
1
star
60

.gitblacklist

Check and Reject certain words commit into git repository.
Shell
1
star
61

Chronos

Sync Server and Client Time by Javascript.
JavaScript
1
star
62

pasteboard

批量粘贴通用解决方案。
JavaScript
1
star
63

BaiduIndexAPI.php

第三方百度指数 API (PHP版)
1
star
64

imagic

Imagic send data by image, for tests mock.
JavaScript
1
star
65

samoyed

The samoyed life timeline who named Summer.
Makefile
1
star
66

open-basketball-court

开放篮球场地标工程
1
star
67

jquery.mousepause.js

Add mousepause event for jQuery (trigger when mouse move stoped).
JavaScript
1
star
68

jquery.editable.js

JavaScript
1
star
69

spm-xgettext

GUN xgettext-like for spm.
JavaScript
1
star
70

family-tree-builder-zh_cn

Family Tree Builder 简体中文语言包
1
star
71

tabbar

TabBar
JavaScript
1
star
72

jquery.checkallable.js

支持Checkbox 和 Radio,及 shiftKey 多选功能。
JavaScript
1
star
73

twitter

@hotoo tweets page.
JavaScript
1
star
74

.n-completion

n completion
1
star
75

repeatable

之前写的『可重复新增』模块,后来写了全新的 Echo,这个模块闲置没管,因为换电脑先备份在这。
JavaScript
1
star
76

Snotra

Vim-like WYSIWYG Web Editor
1
star
77

jsbc

JavaScript code Batch Compiler
JavaScript
1
star