Day of Week and Holiday Calcuation Service

Give me your short comment.

The service calculating day of week and holiday for each day in specified month.

Web Services act to provide single feature, applications are built by some Web Services.

Please read Terms of Use before using the services.

Service URL

The URL for this service is http://www.finds.jp/ws/calendar.php .

Parameters

See also Toy Service General Specs.

jsonp (General)
If this is set by a function name, JSONP style documents are returned. If this is set without a function name, JSON style documents are returned.
json (General)
If this is set, JSON style documents are returned. The value may be set by any value or may not be set.
php (General)
If this is set, PHP Serialization style documents are returned. The value may be set by any value or may not be set.
y
The Gregorian year. y must not be less than 2000.
m
The month. m must be between 1 (January) and 12 (December).
t
The listing type. Default is 'a'.
t=a
Returned list contains all days.
t=h
Returned list contains the days which are holiday.
l
The "level" of holiday. Default is 0.
l=1
Only the holidays.
l=2
Holidays and holidays-in-lieu.
l=3
Holidays, holidays-in-lieu and holidays-in-law
l=0 (or l is not specified)
All days which are not weekdays (htype=0).
lc
The language. Default is Japanese.
lc=en
Entities at <hname> element are written in English. <hkana> element must not appear.

Response document

Root element

The name of the root element is calendar .

Response status

CodeDescription
200Service finished successfully (General)
400Service failed because of wrong parameters (General)
500Service failed inside the server (General)

"result" element

See also Toy Service General Specs.

result element has elements as below.

<year>
Has the year specified by the parameter.
<month>
Has the month specified by the parameter. This is between 1 (January) and 12 (December).
<firstwday>
Has the week code at the first day of specified month. The code is between 1 (Sunday) and 7 (Saturaday).
<days>
Has the length of days of specified month.
<day> (Iteration)
Has infromation of each day.
mday
Has the day of month. This is between 1 and 31 (, 28, 29 or 30).
wday
Has the week code. The code is between 1 (Sunday) and 7 (Saturaday).
htype
Has the type code of the holiday. The code as following:
0
Not holiday
1
Holiday
2
Holiday-in-lieu
3
Holiday-in-law
9
Others (ex. New-year-holiday, End-year-holiday)
hname
Has the name of the holiday. This element is available only if the day is holiday (htype value is more than zero). If not, this element is not avialable.
hkana
Has the reading of the holiday in Kana. If hname value is available and written in Japanese, this element is also available. If hanme is not available or hanme is not written in Japanese, this element is not available.

Example

The response documents are written as XML document, or JavaScript or PHP programing language. Human being may be able to read not so easily.

May, 2008 (Containing holiday-in-lieu)
September, 2009 (Containing holiday-in-law)
Specified only year
No parameter


© 2011 National Agriculture and Food Research Organization | NARO Official Website

[To TOP]