Commit Graph

49 Commits

Author SHA1 Message Date
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
dghart
8e4b492cf4 Clarify what happens if the wxDateTime::SetToWeekDay month and/or year parameters are left as the default Inv_Month/Inv_Year
This causes the month and/or year being set to their wxDateTime::Now values, even if the original values in the wxDateTime object were valid.
2019-01-26 21:12:07 +00:00
dghart
2716347f17 Correct the order of parameters in the wxDateTime::SetToWeekDay examples
e.g. "For example, SetToWeekDay(wxDateTime::Wed, 2)"
not  "For example, SetToWeekDay(2, wxDateTime::Wed)"
2019-01-26 20:55:20 +00:00
Scott Talbert
c68e5d0617 Fix some spelling/grammar errors in documentation
Mostly replace ungrammatical "allows to do" with correct "allows doing".

Closes https://github.com/wxWidgets/wxWidgets/pull/1183
2019-01-26 03:50:47 +01:00
Vadim Zeitlin
c83f3b3942 Clarify wxDateTime::GetTicks() limitation even more
Explain that this function exists only for interoperability purposes and
that GetValue() should be preferred for anything else.

Closes #18182.
2018-08-01 12:02:51 +02:00
Vadim Zeitlin
d49784b0a2 Disable wxDateTime tests failing due to TZ offset changes
wxDateTime timezone-related methods always use the current timezone
offset, while other methods, using CRT, use correct value for the given
date, which may be different.

This discrepancy accounted for test failures in Europe/Minsk time zone
as Belarus has switched from UTC+2 to UTC+3 since 1999 date used in the
test.

It is impossible to really fix the problem easily, so just skip the test
in this case and also mention this bug in the documentation.

See #15370.
2017-11-30 17:44:41 +01:00
Vadim Zeitlin
c7c30504c8 Do nothing when converting wxDateTime to/from local time zone
In particular, do not (unexpectedly) adjust time by the DST.

Closes #16585.

See #10445.
2017-11-29 23:18:57 +01:00
Vadim Zeitlin
543c522cb8 Explicitly disambiguate local time zone from UTC
Don't rely on time zone offset to check whether it is local as this
doesn't, and can't, work for the local time zone in Great Britain which
uses the same offset as UTC, but does use DST, unlike the latter.

Add a unit test (albeit disabled by default) checking that the code that
previously didn't work correctly in BST does work now (run the tests
using "TZ=Europe/London ./test wxDateTime-BST-bugs" under Unix to test).

Closes #14317, #17220.

See #10445.
2017-11-29 23:02:22 +01:00
Vadim Zeitlin
f19012c62c Merge branch 'firstweekday' of https://github.com/lanurmi/wxWidgets
Add API for determining the first day of the week and use it in
wxCalendarCtrl.

Closes https://github.com/wxWidgets/wxWidgets/pull/522
2017-09-10 21:41:36 +02:00
Lauri Nurmi
94c35b2cdd Implement new static function wxDateTime::GetFirstWeekDay()
This function tries to determine the preferred first day of week to use in
calendars. The procedure for obtaining this information is highly
platform-dependent, and is not possible on all platforms; in that case
Sunday is used as the fallback value.

Implementations are included for MSW, OSX, and Linux.
2017-09-02 17:02:35 +03:00
Vadim Zeitlin
24623c4c85 Correct wxDateTime::GetTicks() documentation
Assert only happens if the object is not initialized, not if contains a
moment outside of the standard time_t range.

Closes #17927.
2017-07-29 20:43:11 +02:00
Vadim Zeitlin
f6d9d7962e Revert wrong fix for wxDateTime timezone conversion to/from local
This reverts commit aaddf6be7f as it broke
handling of dates when local time zone is BST, whose offset not counting DST
is 0, as for UTC, but which still should be handled as local timezone,
see #17220.

With the current wxDateTime handling of time zones, FromTimezone(Local)
doesn't make much sense anyhow, so abandon attempts to try making it work as
to really do it we need to specify the time zone being converted from too, as
explained in the second point of #10445.

See #16585.
2017-04-19 17:07:44 +02:00
Vadim Zeitlin
aa84e6379a Document wxDateTime::GetValue()
It was referred to in GetTicks() description but not documented itself, add it
now.
2016-06-24 14:20:34 +02:00
Vadim Zeitlin
5e5d872150 Document wxDateTime comparison operators behaviour
Mention that they intentionally can't be used with invalid objects except for
the exact comparison.
2016-04-12 20:51:09 +02:00
Vadim Zeitlin
1b90acc357 Add wxDateTime::GetWeekBasedYear().
It was just added as a private function to implement %V format specifier
support, just extract and document it as it could possibly be useful in its
own right.

See #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76989 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:41 +00:00
Vadim Zeitlin
29b68052bb Add support for "%V" and "%G" to wxDateTime::Format().
This is useful for creating ISO 8601 week number based stamps.

Closes #11857.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:47:36 +00:00
Vadim Zeitlin
17d698cca5 Consistently handle DST start time in wxDateTime::Set().
Always move the dates invalid due to DST (i.e. falling into the "missing" hour
on the DST start date) forward, as GNU libc does, even when using a different
CRT implementation, such as MSVC one which moves the invalid dates backwards.

This seems more expected and also fixes an especially bad problem which
happened due to moving the date backwards in Brazilian time zone where DST
starts at midnight as doing this changed the day and totally broke ParseDate()
assumption that setting wxDateTime to 00:00:00 at the given date really did
set it to this date.

Closes #15419.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-09-08 18:00:58 +00:00
Vadim Zeitlin
9d94efd8b0 Remove never implemented wxDateTime::IsGregorianDate().
This method was declared and even documented but never actually implemented,
and GregorianAdoption enum used by it had many incorrectly defined elements.

Just remove both the method and the enum instead of fixing/implementing them
as they are not that important (as witnessed by the fact that nobody has
complained about the method being missing since almost 15 years).

Closes #15400.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-09 20:55:20 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
416d505ee9 Explicitly mention that wxDateTime ticks origin is in UTC.
Make it clear that the number of ticks is counted since the same moment in all
time zones.

See #13098.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74422 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-06 18:20:45 +00:00
Vadim Zeitlin
19058c7670 Document wxDateTime arithmetic operators.
wxDateTime::operator+() and operator-() were not documented, do it now.

Also fix the return value of wxDateTime::Add().

See #15130.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-03-31 01:12:00 +00:00
Vadim Zeitlin
0824e36969 Fix premature truncation of brief descriptions in Doxygen comments.
Don't end the brief description at the first period if it's a period which is
part of "i.e." or "e.g.": escape the space following it to prevent Doxygen
from recognizing it as an end of sentence.

See #14866.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73084 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-01 00:14:07 +00:00
Vadim Zeitlin
d2a02746c6 Make wxDateTime invalid after Set((time_t)-1) call.
Closes #14776.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72750 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-24 14:02:30 +00:00
Vadim Zeitlin
16630eb7e3 Add wxDateSpan::GetTotalMonths() method.
This is similar to the existing GetTotalDays() and counts both months and
years.

See #14704.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72615 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-04 22:48:07 +00:00
Vadim Zeitlin
77dd7daad2 Add wxDateTime::DiffAsDateSpan().
This method returns the difference between the dates as wxDateSpan, unlike the
existing Subtract() and overloaded operator-() that return wxTimeSpan.

Closes #14704.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72600 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-10-01 09:55:05 +00:00
Robin Dunn
e5e10e234e Remove the wxPython-only doc snippets from the C++ docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71170 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-04-10 03:27:44 +00:00
Vadim Zeitlin
324ab5e2db Document that wxDateTime::UNow() returns UTC time.
This wasn't clear and was probably surprising as this is different from Now()
behaviour.

See #14149.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-28 11:29:40 +00:00
Robin Dunn
e73d7e569f fix missing and broken items in the datetime interface
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-02 21:51:21 +00:00
Vadim Zeitlin
cb8ae61385 Minor fixes to wxDateTime documentation.
Use @onlyfor{wxmsw} for MSW-specific methods; fix the return type of
operator+=().

Closes #14024.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70655 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-20 21:57:13 +00:00
Vadim Zeitlin
400930d344 Document wxDateTime::GregorianAdoption enum and TimeZone class.
These types are referenced by the other documented functions so should be
documented themselves.

Closes #13959.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70571 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-02-11 18:36:44 +00:00
Bryan Petty
57ab6f2314 Extensive documentation typo patch (closes #13063).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67279 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-22 14:08:30 +00:00
Vadim Zeitlin
5ed8879eaf Make wxDateTime::Tm::yday public and document it.
There doesn't seem any reason to allow access to all the other struct Tm
fields but not yday so make it public, fill it in correctly when creating Tm
without using its ctor from struct tm and document struct Tm itself including
its yday field.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65649 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-09-26 22:11:21 +00:00
Francesco Montorsi
b2025b311a small doxygen warning fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65100 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-25 11:24:38 +00:00
Vadim Zeitlin
526954c596 Globally use "wxWindows licence" consistently.
Use "wxWindows licence" and not "wxWidgets licence" (the latter doesn't
exist) and consistently spell "licence" using British spelling.

See #12165.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64940 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-07-13 13:29:13 +00:00
Francesco Montorsi
dc735b4085 fix errors/inconsistencies pointed out by ifacecheck
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64292 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-05-11 21:12:10 +00:00
Vadim Zeitlin
7633bfcd68 Clarify wxDateTime::ParseDateTime() semantics: it needs both date and time.
Correct documentation and also remove unnecessary initialization of variables
and comments in the function itself.

See #11846.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-22 22:56:17 +00:00
Vadim Zeitlin
c398434d92 abandon attempts to make wxAnyStrPtr behave as bool: user-defined logical operators don't short circuit silently breaking existing code so it is better to not provide them at all; instead simply return bool from the new versions taking wxString::const_iterator; advise to use the new versions in the new code and so in our own files
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-25 09:54:10 +00:00
Vadim Zeitlin
254696bb8f return a wxAnyStrPtr covnertible to either narrow or wide char pointer from wxDateTime::ParseXXX() methods to improve compatibility with wx 2.8 and also simplify the code (closes #9560)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 23:21:29 +00:00
Vadim Zeitlin
e538985edc added GetEnglish{Month,WeekDay}Name()
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59811 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-24 16:51:10 +00:00
Francesco Montorsi
d7612120de remove references to datetime_constants; they're not needed anymore
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59282 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-02 20:41:08 +00:00
Francesco Montorsi
a3fc1c9455 document internal wxDateTime enums the way they're meant to be documented in Doxygen
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-01 21:00:57 +00:00
Francesco Montorsi
747199de1a do not duplicate large blocks of docs; use @overload instead; provide link to the standard strftime() docs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-03-01 20:35:07 +00:00
Francesco Montorsi
3c99e2fd1b recategorize many misplaced classes; move lots of classes from miscellaneous [window] category to more specific categories; add the 'Book controls' and the 'Application and system configuration' class groups
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59051 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-02-20 11:34:52 +00:00
Francesco Montorsi
882678ebb4 other ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57994 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 23:44:44 +00:00
Francesco Montorsi
382f12e419 many automated ifacecheck fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-01-10 22:42:09 +00:00
Francesco Montorsi
4ccf056633 interface fixes; removed many functions which were deprecated in past and have already been removed from wx; renamed others wrongly named; added some @onlyfor tags to avoid false warnings in ifacecheck logs
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56785 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-11-15 11:37:43 +00:00
Vadim Zeitlin
fac938f8fd fix some typos and other minor problems (#9886)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55448 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-09-03 20:36:54 +00:00
Bryan Petty
12f5e1e78f Commit 3 of 3 for Doxygen path fixes, this one finally removes all 600+ unnecessary uses of @wxheader and @headerfile.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 18:00:03 +00:00
Bryan Petty
ae3c17b401 Moved all interface headers into a 'wx' subdirectory for proper use of Doxygen path settings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54385 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-06-27 16:22:58 +00:00