Skip to content
/ dateutil Public

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

License

Notifications You must be signed in to change notification settings

fefit/dateutil

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

License

Stars

Watchers

Forks

Packages

No packages published