Add isdayoff.ru/now endpoint with current day

Issue #22 resolved
Alexey Korepov created an issue

Most often query to service, as I guess, is status of current day. So will be good to add pre-defined short isdayoff.ru/now endpoint for those needs, that can be easier reused, instead of formatting current date.

For work right in all timezones, can be added “timezone” GET argument, in which we can pass numeric diff, ISO 8601, or named timezone.

Also will be good to have similar tomorrow url.

P.S. Also will be good to display 404 error on non-exists url in website, instead of frontpage.

Comments (5)

  1. Andrey Esin repo owner

    Hi

    For now, in beta-test mode, you can use endpoints:

    https://isdayoff.ru/today - shows is today dayoff

    https://isdayoff.ru/now -shows current date, time and timezone

    isdayoff try to detect your zone automatically, but if something goes wrong, you can use parameter “tz“ (TZ from IANA database - https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List)

    For example, for Russia

    https://isdayoff.ru/today?tz=Europe/Moscow

    Tomorrow will be in nearest time 🙂 - added to my backlog

    About 404 - I will try to do something with that, looks like, in one of deploing was something is broken

  2. Log in to comment