Skip to content

Commit

Permalink
remove date handler
Browse files Browse the repository at this point in the history
  • Loading branch information
flavioltonon committed Apr 5, 2019
1 parent e6719f8 commit b853abe
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 185 deletions.
151 changes: 0 additions & 151 deletions date.go

This file was deleted.

34 changes: 0 additions & 34 deletions example/example.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,38 +97,4 @@ func main() {
log.Println(sus.Number(true))

// ------------------------------------------------------------------------------------------------

// Generates a new time.Time date inside of a chosen range of years
newDate, err := brazil.RandomDate(0, 1000)
if err != nil {
log.Println(err)
return
}

// Creates a new Date struct
date, err := brazil.ParseDate(newDate)
if err != nil {
log.Println(err)
log.Println(newDate)
return
}

// Returns date
log.Println(date.Date())

// Returns time
log.Println(date.Time())

// Validators - return true when their condition is matched
log.Println(date.IsFuture())
log.Println(date.IsToday())
log.Println(date.IsPast())

// Returns true if date is older than the input date object
log.Println(date.IsOlderThan(date))

// Returns true if year input is a leap year
log.Println(brazil.IsLeapYear(date.Year()))

// ------------------------------------------------------------------------------------------------
}

0 comments on commit b853abe

Please sign in to comment.