Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 1.06 KB

readme.md

File metadata and controls

41 lines (27 loc) · 1.06 KB

FluentDateTime

Allows cleaner DateTime expressions and operations.

Inspired by Ruby DateTime Extensions

Usage

Here is some examples of use cases

// DateTime operations
DateTime.Now  - 1.Weeks() - 3.Days() + 14.Minutes()
DateTime.Now  + 5.Years()

// Relative DateTime evaluations
3.Days().Ago()
2.Days().Since(DateTime.Now)

// Fluent DateTime estimations
DateTime.Now.NextDay()
DateTime.Now.NextYear()
DateTime.Now.PreviousYear()
DateTime.Now.WeekAfter()
DateTime.Now.Midnight()
DateTime.Now.Noon()

// Current DateTime manipulation
DateTime.Now.SetTime(11, 55, 0)

See Unit Tests in the project for more details.

Icon

Calendar from The Noun Project