File: example.js

package info (click to toggle)
lunar-date 3.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 948 kB
  • sloc: javascript: 13,172; ansic: 2,414; python: 152; xml: 34; sh: 33; makefile: 6
file content (10 lines) | stat: -rwxr-xr-x 299 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
#!/usr/bin/env gjs-console
const Gettext = imports.gettext;
const LunarDate = imports.gi.LunarDate;
Gettext.setlocale(Gettext.LocaleCategory.ALL, null);

var l = new LunarDate.Date();
l.set_solar_date(2010,4,2,18);
var out = l.strftime("%(NIAN)年%(YUE)月%(RI)日%(SHI)时");
print(out);
l.free();