[Pkg-owncloud-commits] [php-sabre-vobject] 41/65: add a bit documentation and milliseconds to parseVCardTime()

David Prévot taffit at moszumanska.debian.org
Tue Feb 24 23:57:17 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository php-sabre-vobject.

commit 90c2a3c496bd048fd69fcc2cdc347dfae1af9945
Author: Armin Hackmann <armin at fruux.com>
Date:   Thu Feb 5 14:36:08 2015 +0100

    add a bit documentation and milliseconds to parseVCardTime()
---
 lib/DateTimeParser.php | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/DateTimeParser.php b/lib/DateTimeParser.php
index f6e9c20..4b9a8d1 100644
--- a/lib/DateTimeParser.php
+++ b/lib/DateTimeParser.php
@@ -199,7 +199,7 @@ class DateTimeParser {
      * This method returns an array, not a DateTime value.
      *
      * The elements in the array are in the following order:
-     * year, month, date, hour, minute, second, timezone
+     * year, month, date, hour, minute, second, millisecond, timezone
      *
      * Almost any part of the string may be omitted. It's for example legal to
      * just specify seconds, leave out the year, etc.
@@ -334,7 +334,7 @@ class DateTimeParser {
      * This method returns an array, not a DateTime value.
      *
      * The elements in the array are in the following order:
-     * hour, minute, second, timezone
+     * hour, minute, second, millisecond, timezone
      *
      * Almost any part of the string may be omitted. It's for example legal to
      * just specify seconds, leave out the hour etc.
@@ -376,6 +376,7 @@ class DateTimeParser {
             (?P<minute> [0-9]{2} | -)?
             (?P<second> [0-9]{2})?
 
+            (?: \.(?P<millisecond> [0-9]{3}))?
             (?P<timezone> # timezone offset
 
                 Z | (?: \+|-)(?: [0-9]{4})
@@ -392,6 +393,7 @@ class DateTimeParser {
                 (?: (?P<minute> [0-9]{2}) : | -)?
                 (?P<second> [0-9]{2})?
 
+                (?: \.(?P<millisecond> [0-9]{3}))?
                 (?P<timezone> # timezone offset
 
                     Z | (?: \+|-)(?: [0-9]{2}:[0-9]{2})
@@ -408,6 +410,7 @@ class DateTimeParser {
             'hour',
             'minute',
             'second',
+            'millisecond',
             'timezone'
         );
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabre-vobject.git



More information about the Pkg-owncloud-commits mailing list