| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 WTF_EXPORT bool isLeapYear(int year); | 71 WTF_EXPORT bool isLeapYear(int year); |
| 72 | 72 |
| 73 // Returns the number of days from 1970-01-01 to the specified date. | 73 // Returns the number of days from 1970-01-01 to the specified date. |
| 74 WTF_EXPORT double dateToDaysFrom1970(int year, int month, int day); | 74 WTF_EXPORT double dateToDaysFrom1970(int year, int month, int day); |
| 75 WTF_EXPORT int msToYear(double ms); | 75 WTF_EXPORT int msToYear(double ms); |
| 76 WTF_EXPORT int dayInYear(int year, int month, int day); | 76 WTF_EXPORT int dayInYear(int year, int month, int day); |
| 77 WTF_EXPORT int dayInYear(double ms, int year); | 77 WTF_EXPORT int dayInYear(double ms, int year); |
| 78 WTF_EXPORT int monthFromDayInYear(int dayInYear, bool leapYear); | 78 WTF_EXPORT int monthFromDayInYear(int dayInYear, bool leapYear); |
| 79 WTF_EXPORT int dayInMonthFromDayInYear(int dayInYear, bool leapYear); | 79 WTF_EXPORT int dayInMonthFromDayInYear(int dayInYear, bool leapYear); |
| 80 | 80 |
| 81 // Returns offset milliseconds for UTC and DST. | 81 // Returns milliseconds with UTC and DST. |
| 82 WTF_EXPORT int32_t calculateUTCOffset(); | 82 WTF_EXPORT double convertToLocalTime(double ms); |
| 83 WTF_EXPORT double calculateDSTOffset(double ms, double utcOffset); | |
| 84 | 83 |
| 85 } // namespace WTF | 84 } // namespace WTF |
| 86 | 85 |
| 87 using WTF::isLeapYear; | 86 using WTF::isLeapYear; |
| 88 using WTF::dateToDaysFrom1970; | 87 using WTF::dateToDaysFrom1970; |
| 89 using WTF::dayInMonthFromDayInYear; | 88 using WTF::dayInMonthFromDayInYear; |
| 90 using WTF::dayInYear; | 89 using WTF::dayInYear; |
| 91 using WTF::minutesPerHour; | 90 using WTF::minutesPerHour; |
| 92 using WTF::monthFromDayInYear; | 91 using WTF::monthFromDayInYear; |
| 93 using WTF::msPerDay; | 92 using WTF::msPerDay; |
| 94 using WTF::msPerHour; | 93 using WTF::msPerHour; |
| 95 using WTF::msPerMinute; | 94 using WTF::msPerMinute; |
| 96 using WTF::msPerSecond; | 95 using WTF::msPerSecond; |
| 97 using WTF::msToYear; | 96 using WTF::msToYear; |
| 98 using WTF::secondsPerMinute; | 97 using WTF::secondsPerMinute; |
| 99 using WTF::parseDateFromNullTerminatedCharacters; | 98 using WTF::parseDateFromNullTerminatedCharacters; |
| 100 using WTF::makeRFC2822DateString; | 99 using WTF::makeRFC2822DateString; |
| 101 using WTF::calculateUTCOffset; | 100 using WTF::convertToLocalTime; |
| 102 using WTF::calculateDSTOffset; | |
| 103 | 101 |
| 104 #endif // DateMath_h | 102 #endif // DateMath_h |
| OLD | NEW |