| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) | 2 * Copyright (C) 1999-2000 Harri Porten (porten@kde.org) |
| 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. |
| 4 * Copyright (C) 2009 Google Inc. All rights reserved. | 4 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 5 * Copyright (C) 2010 Research In Motion Limited. All rights reserved. | 5 * Copyright (C) 2010 Research In Motion Limited. All rights reserved. |
| 6 * | 6 * |
| 7 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 7 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
| 8 * | 8 * |
| 9 * The contents of this file are subject to the Mozilla Public License Version | 9 * The contents of this file are subject to the Mozilla Public License Version |
| 10 * 1.1 (the "License"); you may not use this file except in compliance with | 10 * 1.1 (the "License"); you may not use this file except in compliance with |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 namespace WTF { | 58 namespace WTF { |
| 59 | 59 |
| 60 WTF_EXPORT void initializeDates(); | 60 WTF_EXPORT void initializeDates(); |
| 61 WTF_EXPORT int equivalentYearForDST(int year); | 61 WTF_EXPORT int equivalentYearForDST(int year); |
| 62 | 62 |
| 63 // Not really math related, but this is currently the only shared place to put t
hese. | 63 // Not really math related, but this is currently the only shared place to put t
hese. |
| 64 WTF_EXPORT double parseES5DateFromNullTerminatedCharacters(const char* dateStrin
g); | 64 WTF_EXPORT double parseES5DateFromNullTerminatedCharacters(const char* dateStrin
g); |
| 65 WTF_EXPORT double parseDateFromNullTerminatedCharacters(const char* dateString); | 65 WTF_EXPORT double parseDateFromNullTerminatedCharacters(const char* dateString); |
| 66 WTF_EXPORT double parseDateFromNullTerminatedCharacters(const char* dateString,
bool& haveTZ, int& offset); | 66 WTF_EXPORT double parseDateFromNullTerminatedCharacters(const char* dateString,
bool& haveTZ, int& offset); |
| 67 WTF_EXPORT double timeClip(double); | 67 WTF_EXPORT double timeClip(double); |
| 68 // dayOfWeek: [0, 6] 0 being Monday, day: [1, 31], month: [0, 11], year: ex: 201
1, hours: [0, 23], minutes: [0, 59], seconds: [0, 59], utcOffset: [-720,720]. | 68 // dayOfWeek: [0, 6] 0 being Monday, day: [1, 31], month: [0, 11], year: ex: 201
1, hours: [0, 23], minutes: [0, 59], seconds: [0, 59], utcOffset: [-720,720]. |
| 69 WTF_EXPORT String makeRFC2822DateString(unsigned dayOfWeek, unsigned day, unsign
ed month, unsigned year, unsigned hours, unsigned minutes, unsigned seconds, int
utcOffset); | 69 WTF_EXPORT String makeRFC2822DateString(unsigned dayOfWeek, unsigned day, unsign
ed month, unsigned year, unsigned hours, unsigned minutes, unsigned seconds, int
utcOffset); |
| 70 | 70 |
| 71 inline double jsCurrentTime() | 71 inline double jsCurrentTime() |
| 72 { | 72 { |
| 73 // JavaScript doesn't recognize fractions of a millisecond. | 73 // JavaScript doesn't recognize fractions of a millisecond. |
| 74 return floor(WTF::currentTimeMS()); | 74 return floor(WTF::currentTimeMS()); |
| 75 } | 75 } |
| 76 | 76 |
| 77 const char* const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "
Sun" }; | 77 const char* const weekdayName[7] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "
Sun" }; |
| 78 const char* const monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "J
ul", "Aug", "Sep", "Oct", "Nov", "Dec" }; | 78 const char* const monthName[12] = { "Jan", "Feb", "Mar", "Apr", "May", "Jun", "J
ul", "Aug", "Sep", "Oct", "Nov", "Dec" }; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 using WTF::msToDays; | 121 using WTF::msToDays; |
| 122 using WTF::msToMinutes; | 122 using WTF::msToMinutes; |
| 123 using WTF::msToHours; | 123 using WTF::msToHours; |
| 124 using WTF::secondsPerMinute; | 124 using WTF::secondsPerMinute; |
| 125 using WTF::parseDateFromNullTerminatedCharacters; | 125 using WTF::parseDateFromNullTerminatedCharacters; |
| 126 using WTF::makeRFC2822DateString; | 126 using WTF::makeRFC2822DateString; |
| 127 using WTF::calculateUTCOffset; | 127 using WTF::calculateUTCOffset; |
| 128 using WTF::calculateDSTOffset; | 128 using WTF::calculateDSTOffset; |
| 129 | 129 |
| 130 #endif // DateMath_h | 130 #endif // DateMath_h |
| OLD | NEW |