TimeInfo.js 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. function TimeInfo() {
  2. Object.defineProperties(this, {
  3. 'seconds': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_seconds, set: TimeInfo.prototype.__set_seconds},
  4. 'minutes': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_minutes, set: TimeInfo.prototype.__set_minutes},
  5. 'hours': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_hours, set: TimeInfo.prototype.__set_hours},
  6. 'month': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_month, set: TimeInfo.prototype.__set_month},
  7. 'monthDay': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_monthDay, set: TimeInfo.prototype.__set_monthDay},
  8. 'weekDay': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_weekDay, set: TimeInfo.prototype.__set_weekDay},
  9. 'year': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_year, set: TimeInfo.prototype.__set_year},
  10. 'yearDay': { enumerable: true, configurable: true, get: TimeInfo.prototype.__get_yearDay, set: TimeInfo.prototype.__set_yearDay}
  11. })
  12. }
  13. TimeInfo.prototype.__get_seconds = function() {
  14. return Polycode.TimeInfo__get_seconds(this.__ptr)
  15. }
  16. TimeInfo.prototype.__set_seconds = function(val) {
  17. Polycode.TimeInfo__set_seconds(this.__ptr, val)
  18. }
  19. TimeInfo.prototype.__get_minutes = function() {
  20. return Polycode.TimeInfo__get_minutes(this.__ptr)
  21. }
  22. TimeInfo.prototype.__set_minutes = function(val) {
  23. Polycode.TimeInfo__set_minutes(this.__ptr, val)
  24. }
  25. TimeInfo.prototype.__get_hours = function() {
  26. return Polycode.TimeInfo__get_hours(this.__ptr)
  27. }
  28. TimeInfo.prototype.__set_hours = function(val) {
  29. Polycode.TimeInfo__set_hours(this.__ptr, val)
  30. }
  31. TimeInfo.prototype.__get_month = function() {
  32. return Polycode.TimeInfo__get_month(this.__ptr)
  33. }
  34. TimeInfo.prototype.__set_month = function(val) {
  35. Polycode.TimeInfo__set_month(this.__ptr, val)
  36. }
  37. TimeInfo.prototype.__get_monthDay = function() {
  38. return Polycode.TimeInfo__get_monthDay(this.__ptr)
  39. }
  40. TimeInfo.prototype.__set_monthDay = function(val) {
  41. Polycode.TimeInfo__set_monthDay(this.__ptr, val)
  42. }
  43. TimeInfo.prototype.__get_weekDay = function() {
  44. return Polycode.TimeInfo__get_weekDay(this.__ptr)
  45. }
  46. TimeInfo.prototype.__set_weekDay = function(val) {
  47. Polycode.TimeInfo__set_weekDay(this.__ptr, val)
  48. }
  49. TimeInfo.prototype.__get_year = function() {
  50. return Polycode.TimeInfo__get_year(this.__ptr)
  51. }
  52. TimeInfo.prototype.__set_year = function(val) {
  53. Polycode.TimeInfo__set_year(this.__ptr, val)
  54. }
  55. TimeInfo.prototype.__get_yearDay = function() {
  56. return Polycode.TimeInfo__get_yearDay(this.__ptr)
  57. }
  58. TimeInfo.prototype.__set_yearDay = function(val) {
  59. Polycode.TimeInfo__set_yearDay(this.__ptr, val)
  60. }
  61. Duktape.fin(TimeInfo.prototype, function (x) {
  62. if (x === TimeInfo.prototype) {
  63. return;
  64. }
  65. Polycode.TimeInfo__delete(x.__ptr)
  66. })