File: example.vala

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 (16 lines) | stat: -rwxr-xr-x 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env -S vala --pkg lunar-date-3.0

using Lunar;

static int main (string[] args) {
	//Environment.set_variable ("LC_ALL", "zh_CN.utf8", true);
	Intl.setlocale(LocaleCategory.ALL, "");
	var t = new Lunar.Date();
	try {
		t.set_solar_date(2009, DateMonth.JULY, 1, 8 );
	} catch (Error e) {
		return 1;
	}
	print("%s\n", t.strftime("%(YEAR)年%(YUE)月%(RI)日"));
	return 0;
}