Skip to content
fefitPublic

About

An implementation of PHP methods 'strtotime'(not include the relative formats now), 'date_format' in golang.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Latest commit

 

History

22 Commits

Folders and files

Repository files navigation

dateutil

Build Status codecov

An implementation of PHP methods 'strtotime'(not include the relative formats now), 'date_format' in golang.

Usage

import (
  "fmt"
  du "github.com/fefit/dateutil"
)
func main(){
   if date, err := du.DateTime("Sep-05-2021 06:07:06pm"); err == nil{
     formatted, _ := du.DateFormat(date, "Y-m-d H:i:s")
     fmt.Printf("%s", formatted) // Output: 2021-09-05 18:07:06
   }
}

License

MIT License.

About

An implementation of PHP methods 'strtotime'(not include the relative formats now), 'date_format' in golang.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages