Skip to content

Commit 94688af

Browse files
authored
Merge pull request #1387 from leonstr/patch-20
Date/time value fixes
2 parents daac856 + 7980585 commit 94688af

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

general/development/tools/behat/writing.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -239,23 +239,23 @@ When I set the following fields to these values:
239239
When testing plugins with deadlines, for instance for submissions, it is often necessary to set certain time values to dates relative to today.
240240
You can specify a relative time enclosed within two ## blocks. For example:
241241

242-
- `## yesterday ##`
243-
- `## 2 days ago ##`
242+
- `##yesterday##`
243+
- `##2 days ago##`
244244
You can use everything according to http://php.net/manual/en/datetime.formats.php.
245245

246-
Especially useful are the relative formats from: http://php.net/manual/en/datetime.formats.relative.php
246+
Especially useful are the relative formats from: https://www.php.net/manual/en/datetime.formats.php#datetime.formats.relative
247247

248248
Additionally, you can specify a format you want the date to be returned into:
249249

250-
- `## yesterday ## myformat ##`
251-
These formats can be used as outlined in http://php.net/manual/en/function.date.php.
250+
- `##yesterday##myformat##`
251+
These formats can be used as outlined in https://www.php.net/manual/en/function.strftime.php#refsect1-function.strftime-parameters.
252252
This can be combined with the field groups:
253253

254254
```gherkin
255255
When I set the following fields to these values:
256-
| myDate[day] | ##yesterday##d## |
257-
| myDate[month] | ##yesterday##F## |
258-
| myDate[year] | ##yesterday##Y## |
256+
| myDate[day] | ##yesterday##%d## |
257+
| myDate[month] | ##yesterday##%B## |
258+
| myDate[year] | ##yesterday##%Y## |
259259
```
260260

261261
### Writing your own steps

0 commit comments

Comments
 (0)