The query string for Date Authority data may contain only one Date Authority ID, or may consist of a pair of values.
Argument | Value(s) | Description |
---|---|---|
type | "time" | Specifies the query type |
format | "s" "d" "j" |
Specifies the format in which id value of the when/from/to argument is given.
|
when/from/to | <datecode> | Specifies the Date or Time Period to be returned. |
jsoncallback | <string> | Required by third-party JavaScript libraries (e.g. EXT Js) to perform ajax functions. The value of jsoncallback has no effect on query processing, but will be attached to the beginning of the returned json string. |
abc123({ "W": { "rows": "3", "data1": { "authorityID": "5314240", "JD": "1802675", "ceDate": "+0223-06-16", "dynasty": "孫吳", "emperor": "大帝", "reignYear": "黃武", "yearNumber": "2", "yearGanzhi": "癸卯", "month": " 五", "dayNumber": "1", "dayGanzhi": "戊子" }, "data2": { "dateCode": "5314240", "JD": "1802675", "ceDate": "+0223-06-16", "dynasty": "曹魏", "emperor": "文帝", "reignYear": "黃初", "yearNumber": "4", "yearGanzhi": "癸卯", "month": " 五", "dayNumber": "1", "dayGanzhi": "戊子" }, "data3": { "dateCode": "5314240", "JD": "1802675", "ceDate": "+0223-06-16", "dynasty": "蜀漢", "emperor": "後主", "reignYear": "建興", "yearNumber": "1", "yearGanzhi": "癸卯", "month": " 五", "dayNumber": "1", "dayGanzhi": "戊子" } } })
{ "F": { "rows": "1", "data1": { "authorityID": "5814240", "JD": "2302675", "ceDate": "+1592-05-29", "dynasty": " 明", "emperor": "神宗", "reignYear": "萬曆", "yearNumber": "20", "yearGanzhi": "壬辰", "month": "四", "dayNumber": "19", "dayGanzhi": "戊申" } }, "T": { "rows": "1", "data1": { "authorityID": "5814476", "JD": "2302911", "ceDate": "+1593-01-20", "dynasty": " 明", "emperor": "神宗", "reignYear": "萬曆", "yearNumber": "20", "yearGanzhi": "壬辰", "month": "十二", "dayNumber": "18", "dayGanzhi": "甲辰" } } }
Field Name | Description |
---|---|
F/T/W | Result of From/To/When |
rows | The number of rows in result set |
authorityID | Authority ID of the Date entity |
JD | Julian Day Number |
ceDate | Date in the Western calendar (Common-Era) |
dynasty | Name of the Chinese Dynasty at that Date |
emperor | Name of the Chinese Emperor on that Date |
reignYear | Name of the Reign Year |
yearNumber | Year number of the Reign |
yearGanzhi | Sexagenary number of the year |
month | Name of the Chinese month |
dayNumber | Day number of the given month |
dayGanzhi | Sexagenary number of the day |
function print_ddbcAuth_date(jsoncallback) { // 'jsoncallback' is the string returned by the data-service var html = ''; html += '<table>'; if (jsoncallback.W) { html += '<tr>'; html += '<td>'; html += 'AuthorityID: '+jsoncallback.W.data1.authorityID+'<br />'; html += 'JD: '+jsoncallback.W.data1.JD+'<br />' html += '('+jsoncallback.W.data1.ceDate+')'; html += '</td>'; for (obj in jsoncallback.W) { if (obj != "rows") { html += '<td>'; html += jsoncallback.W[obj].dynasty+jsoncallback.W[obj].emperor+'<br />'; html += jsoncallback.W[obj].reignYear+jsoncallback.W[obj].yearNumber+'年('+jsoncallback.W[obj].yearGanzhi+')<br />'; html += jsoncallback.W[obj].month+'月'+jsoncallback.W[obj].dayNumber+'日('+jsoncallback.W[obj].dayGanzhi+')'; html += '</td>'; } } html += '</tr>'; } html += '</table>'; }