Adding ISO8601 strings and UTC offsets to Time [Pull Request]


This fork contains 4 additional Time functions. ( Tested on Fedora 23, OSX 10.11, Windows 7 with VC2015

- toFullISO8601String returns a fully described ISO string (i.e. 2016-07-11T14:01:30.020+01:00 or 20160711T140130.020+0100) including UTC offset.

- fromFullISO8601String can convert these strings back into times (and could be extended to more of the ISO 8601 spec but this is not that useful for me).

- getUTCOffset returns the offset between the current time zone and UTC for a given time.

- getUTCOffsetString uses getUTCOffset to make an ISO formatted string (+01:00, -01:00, +0100, -0100, Z etc)

    /** Returns a string to indicate offset of the local timezone. Returns +XX:XX,
        -XX:XX or Z

        @param dividers      whether to include ":" divider in the string
    String getUTCOffsetString (bool dividers = true) const noexcept;

    /** Returns a UTC offset of local timezone in seconds. */
    int64 getUTCOffset () const noexcept;
    /** Quick way of getting a fully described string version of a date and time in local timezone
        as an ISO 8601 compatible string.

        For a more powerful way of formatting the date and time, see the formatted() method.

        @param dividers      whether to include "-" and ":" dividers in the string
        @see formatted
        @see fromFullISO8601String
    String toFullISO8601String (bool dividers = true) const noexcept;

    /** Static constructor to make Time objects from full ISO 8601 strings. This function will
        not work on incomplete ISO strings or ones containing week or day of year numbers. It
        is only guaranteed to work with strings generated by toFullISO8601String. If it fails
        it returns a default Time() object.

        @param isoStr        the ISO 8601 time string to be input
        @see toFullISO8601String
    static Time fromFullISO8601String (const String& isoStr) noexcept;