Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
31267934
Kaydet (Commit)
31267934
authored
May 17, 2013
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added documentation about non-normalized invalid dates
Change-Id: I88a95d8fac8af9085d41cf1b13c8ff3ee7abb141
üst
8550935c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
6 deletions
+34
-6
date.hxx
include/tools/date.hxx
+34
-6
No files found.
include/tools/date.hxx
Dosyayı görüntüle @
31267934
...
...
@@ -66,19 +66,47 @@ public:
sal_uInt16
GetMonth
()
const
{
return
(
sal_uInt16
)((
nDate
/
100
)
%
100
);
}
sal_uInt16
GetYear
()
const
{
return
(
sal_uInt16
)(
nDate
/
10000
);
}
/// Internally normalizes a copy of values.
/** Obtain the day of the week for the date.
Internally normalizes a copy of values.
The result may be unexpected for a non-normalized invalid date like
Date(31,11,2000) or a sequence of aDate.SetDay(31); aDate.SetMonth(11);
*/
DayOfWeek
GetDayOfWeek
()
const
;
/// Internally normalizes a copy of values.
/** Obtain the day of the year for the date.
Internally normalizes a copy of values.
The result may be unexpected for a non-normalized invalid date like
Date(31,11,2000) or a sequence of aDate.SetDay(31); aDate.SetMonth(11);
*/
sal_uInt16
GetDayOfYear
()
const
;
/** nMinimumNumberOfDaysInWeek: how many days of a week must reside in the
first week of a year.
Internally normalizes a copy of values. */
/** Obtain the week of the year for a date.
@param nMinimumNumberOfDaysInWeek
How many days of a week must reside in the first week of a year.
Internally normalizes a copy of values.
The result may be unexpected for a non-normalized invalid date like
Date(31,11,2000) or a sequence of aDate.SetDay(31); aDate.SetMonth(11);
*/
sal_uInt16
GetWeekOfYear
(
DayOfWeek
eStartDay
=
MONDAY
,
sal_Int16
nMinimumNumberOfDaysInWeek
=
4
)
const
;
/// Internally normalizes a copy of values.
/** Obtain the number of days in the month of the year of the date.
Internally normalizes a copy of values.
The result may be unexpected for a non-normalized invalid date like
Date(31,11,2000) or a sequence of aDate.SetDay(31); aDate.SetMonth(11);
These would result in 31 as --11-31 rolls over to --12-01 and the
number of days in December is returned.
Instead, to obtain the value for the actual set use the static method
Date::GetDaysInMonth( aDate.GetMonth(), aDate.GetYear()) in such cases.
*/
sal_uInt16
GetDaysInMonth
()
const
;
sal_uInt16
GetDaysInYear
()
const
{
return
(
IsLeapYear
())
?
366
:
365
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment