Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: Source/wtf/DateMath.h

Issue 57383009: Remove duplicate isLeapYear (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix export Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/DateComponents.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 const double hoursPerDay = 24.0; 81 const double hoursPerDay = 24.0;
82 const double minutesPerHour = 60.0; 82 const double minutesPerHour = 60.0;
83 const double secondsPerHour = 60.0 * 60.0; 83 const double secondsPerHour = 60.0 * 60.0;
84 const double secondsPerMinute = 60.0; 84 const double secondsPerMinute = 60.0;
85 const double msPerSecond = 1000.0; 85 const double msPerSecond = 1000.0;
86 const double msPerMinute = 60.0 * 1000.0; 86 const double msPerMinute = 60.0 * 1000.0;
87 const double msPerHour = 60.0 * 60.0 * 1000.0; 87 const double msPerHour = 60.0 * 60.0 * 1000.0;
88 const double msPerDay = 24.0 * 60.0 * 60.0 * 1000.0; 88 const double msPerDay = 24.0 * 60.0 * 60.0 * 1000.0;
89 const double msPerMonth = 2592000000.0; 89 const double msPerMonth = 2592000000.0;
90 90
91 bool isLeapYear(int year); 91 WTF_EXPORT bool isLeapYear(int year);
92 92
93 // Returns the number of days from 1970-01-01 to the specified date. 93 // Returns the number of days from 1970-01-01 to the specified date.
94 WTF_EXPORT double dateToDaysFrom1970(int year, int month, int day); 94 WTF_EXPORT double dateToDaysFrom1970(int year, int month, int day);
95 WTF_EXPORT int msToYear(double ms); 95 WTF_EXPORT int msToYear(double ms);
96 WTF_EXPORT double msToDays(double ms); 96 WTF_EXPORT double msToDays(double ms);
97 WTF_EXPORT int msToMinutes(double ms); 97 WTF_EXPORT int msToMinutes(double ms);
98 WTF_EXPORT int msToHours(double ms); 98 WTF_EXPORT int msToHours(double ms);
99 WTF_EXPORT int dayInYear(int year, int month, int day); 99 WTF_EXPORT int dayInYear(int year, int month, int day);
100 WTF_EXPORT int dayInYear(double ms, int year); 100 WTF_EXPORT int dayInYear(double ms, int year);
101 WTF_EXPORT int monthFromDayInYear(int dayInYear, bool leapYear); 101 WTF_EXPORT int monthFromDayInYear(int dayInYear, bool leapYear);
(...skipping 19 matching lines...) Expand all
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
OLDNEW
« no previous file with comments | « Source/platform/DateComponents.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698