Skip to content

Allows cleaner DateTime expressions and operations

License

Notifications You must be signed in to change notification settings

yuzd/FluentDateTime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FluentDateTime

Build status NuGet Status

Allows cleaner DateTime expressions and operations.

Inspired by Ruby DateTime Extensions

Support is available via a Tidelift Subscription.

NuGet

https://nuget.org/packages/FluentDateTime/

Usage

Here is some examples of use cases

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

// Relative DateTime evalutations
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.

Security contact information

To report a security vulnerability, use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Icon

Calendar from The Noun Project

About

Allows cleaner DateTime expressions and operations

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%