shukujitsu

package module
v0.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2024 License: MIT Imports: 3 Imported by: 0

README

shukujitsu

PkgGoDev test

shukujitsu determines japanese holiday. Holidays are collected from https://www8.cao.go.jp/chosei/shukujitsu/syukujitsu.csv

When csv is updated, you can updated as follow command.

$ go run ./internal/gen/gen.go

Currently, we check it per week at here.

HOW TO USE

if shukujitsu.IsShukujitsu(time.Now()) {
    fmt.Println("shukujitsu!")
}

Documentation

Overview

Code generated by internal/gen/gen.go; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsShukujitsu

func IsShukujitsu(t time.Time) bool

IsShukujitsu determines shukujitsu. This function don't care timezone of arguments time. So you need to care your timezone.

func RunCLI added in v0.0.4

func RunCLI(opt *CLIOption) int

RunCLI runs shukujitsu CLI. return values 0 : is Shukujitsu 1 : is not Shukujitsu 2 : parse error of -d (date)

Types

type CLIOption added in v0.0.4

type CLIOption struct {
	Quiet      bool
	Date       string
	DateFormat string
	Writer     io.Writer
}

CLIOption represents an option for CLI.

Directories

Path Synopsis
cmd
internal
gen

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL