C# Class Faker.Date

Class for date generation
Exibir arquivo Open project: AdmiringWorm/Faker.NET.Portable

Public Methods

Method Description
Backwards ( int days = 365 ) : System.DateTime

Generates a random DateTime between number of days in the past and Today

Between ( System.DateTime from, System.DateTime to ) : System.DateTime

Generates a random DateTime between the specified from and to.

Birthday ( int minAge = 18, int maxAge = 65 ) : System.DateTime

Generates a random DateTime between the specified maximum age and minimum age.

Forward ( int days = 365 ) : System.DateTime

Generates a random DateTime between DateTime.Today">Today and number of

Method Details

Backwards() public static method

Generates a random DateTime between number of days in the past and Today
public static Backwards ( int days = 365 ) : System.DateTime
days int The number of days to calculate the minimum date.
return System.DateTime

Between() public static method

Generates a random DateTime between the specified from and to.
public static Between ( System.DateTime from, System.DateTime to ) : System.DateTime
from System.DateTime The minimum date.
to System.DateTime The maximum date.
return System.DateTime

Birthday() public static method

Generates a random DateTime between the specified maximum age and minimum age.
public static Birthday ( int minAge = 18, int maxAge = 65 ) : System.DateTime
minAge int The minimum years into the past.
maxAge int The maximum years into the past.
return System.DateTime

Forward() public static method

Generates a random DateTime between DateTime.Today">Today and number of
public static Forward ( int days = 365 ) : System.DateTime
days int The number of days to calculate the maximum date.
return System.DateTime