private static function Inline::getTimestampRegex in Plug 7
Gets a regex that matches a YAML date.
Return value
string The regular expression
See also
http://www.yaml.org/spec/1.2/spec.html#id2761573
2 calls to Inline::getTimestampRegex()
- Inline::dump in lib/
Symfony/ yaml/ Symfony/ Component/ Yaml/ Inline.php - Dumps a given PHP variable to a YAML string.
- Inline::evaluateScalar in lib/
Symfony/ yaml/ Symfony/ Component/ Yaml/ Inline.php - Evaluates scalars and replaces magic values.
File
- lib/
Symfony/ yaml/ Symfony/ Component/ Yaml/ Inline.php, line 519
Class
- Inline
- Inline implements a YAML parser/dumper for the YAML inline syntax.
Namespace
Symfony\Component\YamlCode
private static function getTimestampRegex() {
return <<<EOF
~^
(?P<year>[0-9][0-9][0-9][0-9])
-(?P<month>[0-9][0-9]?)
-(?P<day>[0-9][0-9]?)
(?:(?:[Tt]|[ \t]+)
(?P<hour>[0-9][0-9]?)
:(?P<minute>[0-9][0-9])
:(?P<second>[0-9][0-9])
(?:\\.(?P<fraction>[0-9]*))?
(?:[ \t]*(?P<tz>Z|(?P<tz_sign>[-+])(?P<tz_hour>[0-9][0-9]?)
(?::(?P<tz_minute>[0-9][0-9]))?))?)?
\$~x
EOF;
}