Code Monkey home page Code Monkey logo

leap-year-api's Introduction

Leap Year API

Code Coverage

A leap year is a calendar year that contains an additional day added to keep the calendar year synchronized with the astronomical year or seasonal year.

Endpoints

GET /

https://leap.deno.dev

Returns if the current year is leap.

Currently(2022) it returns ๐Ÿ‘‡

{ "result": false }

GET /:year

https://leap.deno.dev/2004

Returns if ${YEAR} is a leap year.

{ "result": true }

GET /range/:start/:end

https://leap.deno.dev/range/1/20

A list with all the leap years from year ${START} to ${END}.

{ "result": [4, 8, 12, 16, 20] }

Usage

You can see usage examples (in different languages) in examples/ and in the tests.

Related

  • leap_year: Contains the core logic of this API.

Includes a CLI Tool if you are interested.

Changelog

  • Jul 21, 2021: Start, using Express and CommonJS ๐ŸŽ‰

The logic to calculate if the year was a leap year was in the router.

  • Dec 23, 2021: Move to ESM ๐Ÿš€

The logic where moved to an NPM package, check-leap-year.

  • Jan 31, 2022: Add usage example in different languages ๐Ÿ‘€

Especially Go, Ruby and Python.

  • 24 Mar, 2022: Moved to Deno, using Oak ๐Ÿฟ

The NPM package was deprecated in favor of @ultirequiem/leap-year, which is Deno first but works on Node.js and the browser too ๐Ÿ˜†

Support

Open an Issue, I will check it a soon as possible ๐Ÿ‘€

If you want to hurry me up a bit send me a tweet ๐Ÿ˜†

Consider supporting me on Patreon if you like my work ๐Ÿ™

Don't forget to start the repo โญ

Licence

Licensed under the MIT License ๐Ÿ“„

leap-year-api's People

Contributors

dependabot[bot] avatar ultirequiem avatar web-flow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

leap-year-api's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.