Giter VIP home page Giter VIP logo

prekin's Introduction

Prekin

Prekin

What is Prekin?

Naming

  • Prekin means PREMIUM FRIDAY
    • kin means FRIDAY (kin-yo-bi) in Japanese
    • So PREmium KIN-yo-bi is Prekin

Webpage

Installation

Add this line to your application's Gemfile:

gem 'prekin'

And then execute:

$ bundle

Or install it yourself as:

$ gem install prekin

Usage

1. require

  • require 'prekin'

2. call

2-1. Time class

  • Time.local(2020, 10, 30, 0, 0, 0).prekin? #=> true

2-2. Date class

  • Date.new(2020, 10, 30).prekin? #=> true

2-3. DateTime class

  • DateTime.new(2020, 10, 30, 0, 0, 0, '+09:00').prekin? #=> true

2-4. String class

  • '2020/10/30 00:00:00 +09:00'.prekin? #=> true

2-5. Next Prekin

  • Prekin.next #=> "2020-10-30"
  • Prekin.next('2023-12-28') #=> "2023-12-29"
  • Prekin.next('2023-12-29') #=> "2023-12-29"
  • Prekin.next('2023-12-30') #=> "2024-01-26"

Note

  • This gem overwrites Time, Date, DateTime and String class.
    • So if you use Time, Date, DateTime and String class in your code, you should be careful.

Development

1. bundle install

  • bundle install

2. irb

  • bundle exec irb

3. require

  • require 'prekin'

License

The gem is available as open source under the terms of the MIT License.

prekin's People

Contributors

dependabot-preview[bot] avatar dependabot[bot] avatar nikukyugamer avatar renovate-bot avatar renovate[bot] avatar

Watchers

 avatar

prekin's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

bundler
Gemfile
github-actions
.github/workflows/config.yml
  • actions/checkout v4
  • actions/cache v4
  • ruby 3.3.0

  • Check this box to trigger a request for Renovate to run again on this repository

Prekin.previous? を追加したい

  • 「先月」の場合に加え、「今月」の場合もあることにちゅういしないといけないし
  • 年またぎも注意しないといけない

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.