timeRange.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /**
  2. * Module exports.
  3. */
  4. module.exports = timeRange;
  5. /**
  6. * True during (or between) the specified time(s).
  7. *
  8. * Even though the examples don't show it, this parameter may be present in
  9. * each of the different parameter profiles, always as the last parameter.
  10. *
  11. *
  12. * Examples:
  13. *
  14. * ``` js
  15. * timerange(12)
  16. * true from noon to 1pm.
  17. *
  18. * timerange(12, 13)
  19. * same as above.
  20. *
  21. * timerange(12, "GMT")
  22. * true from noon to 1pm, in GMT timezone.
  23. *
  24. * timerange(9, 17)
  25. * true from 9am to 5pm.
  26. *
  27. * timerange(8, 30, 17, 00)
  28. * true from 8:30am to 5:00pm.
  29. *
  30. * timerange(0, 0, 0, 0, 0, 30)
  31. * true between midnight and 30 seconds past midnight.
  32. * ```
  33. *
  34. * timeRange(hour)
  35. * timeRange(hour1, hour2)
  36. * timeRange(hour1, min1, hour2, min2)
  37. * timeRange(hour1, min1, sec1, hour2, min2, sec2)
  38. * timeRange(hour1, min1, sec1, hour2, min2, sec2, gmt)
  39. *
  40. * @param {String} hour is the hour from 0 to 23. (0 is midnight, 23 is 11 pm.)
  41. * @param {String} min minutes from 0 to 59.
  42. * @param {String} sec seconds from 0 to 59.
  43. * @param {String} gmt either the string "GMT" for GMT timezone, or not specified, for local timezone.
  44. * @return {Boolean}
  45. */
  46. function timeRange (wd1, wd2, gmt) {
  47. // TODO: implement me!
  48. return false;
  49. }