Using Alice and Faker, How to create an date as string within yaml fixtures?

28 Views Asked by At

In Alice fixtures I want an string refference containing an date in Ymd format with an minimum date.

However I can't seem to get dateTime to date. or an date with an minimum.

I've tried the following

orderId: 'NL-12699-<dateTimeBetween("-2 week", "now")>-<current()>'

This gave me:

 Could not evaluate the expression "<dateTimeBetween(array (  
    0 => '-2 week',                                            
    1 => 'now',                                                
  ))>". 

And I've tried:

orderId: 'NL-12699-<dateTimeBetween("-2 week", "now")->format("Ymd")>-<current()>'

And I've tried:

    orderId: 'NL-12699-<date("Ymd")>-<current()>'

this works, however it has no minimum date. This gives me 1997 dates like: NL-12699-19970921-10

0

There are 0 best solutions below