Categorygithub.com/Clarilab/claridate
modulepackage
1.3.4
Repository: https://github.com/clarilab/claridate.git
Documentation: pkg.go.dev

# README

Introduction

claridate provides several functions regarding the parsing of date and/or time.

Getting Started

To start using this package, just import it and use the Functions like so:

package main

import (
    "fmt"

    "github.com/Clarilab/claridate"
)

func main() {
    dateFormat, err := claridate.DetermineDateFormat("2006-08")
    if err != nil {
        panic(err)
    }

    fmt.Println(dateFormat) // prints "YYYY-MM"
}

Test

To run the tests, run make test in the project directory.

# Functions

DetermineDateFormat receives a date string and returns the format the date string is in.
TransformToDashedDate takes a date string that is in the dotted date format, for example "MM.YYYY" or "DD.MM.YYYY", and converts it to the dashed date format.

# Variables

No description provided by the author