AutoFixture icon indicating copy to clipboard operation
AutoFixture copied to clipboard

Add DateTime ranged relay

Open Tarig0 opened this issue 6 years ago • 3 comments

Allows The ability to Parse Range Attributes for the type DateTime and create a valid DateTime within the specified range

Tarig0 avatar Jan 28 '20 14:01 Tarig0

Not a maintainer.

Would it be possible to add a way to control which culture is used in the parsing process?

It could be helpful to be explicit in a multi-culture environment where developers have their machine with one locale (e.g. it-it) and the build server uses something else (e.g. en-us).

In this case parsing 1/12/1997 might work on a dev machine (where it's read as December 1st) but not on the build server (read as January 12th)

Kralizek avatar Mar 06 '20 22:03 Kralizek

Can you show me how the range attribute can be setup to parse the datetime explicitly?

Tarig0 avatar Mar 12 '20 19:03 Tarig0

Looks like there is no way to override the parse for the range attribute at this time so the current implementation will cover all uses

Tarig0 avatar Mar 25 '20 11:03 Tarig0