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
a97a5310
Kaydet (Commit)
a97a5310
authored
Ara 01, 2011
tarafından
Eike Rathke
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
we are W3C XMLSchema here, not ISO 8601
üst
44ec239e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
11 deletions
+4
-11
test_converter.cxx
sax/qa/cppunit/test_converter.cxx
+3
-5
converter.cxx
sax/source/tools/converter.cxx
+1
-6
No files found.
sax/qa/cppunit/test_converter.cxx
Dosyayı görüntüle @
a97a5310
...
...
@@ -215,13 +215,11 @@ void ConverterTest::testDateTime()
doTest
(
util
::
DateTime
(
0
,
0
,
0
,
24
,
1
,
1
,
333
)
/*(0, 0, 0, 0, 2, 1, 333)*/
,
"0333-01-01T24:00:00"
/*, "0333-01-02T00:00:00"*/
);
// A leading ^+ is NOT invalid, ISO 8601 specifies this for explicit AD/CE.
doTest
(
util
::
DateTime
(
0
,
0
,
0
,
0
,
1
,
1
,
1
),
"+0001-01-01T00:00:00"
,
"0001-01-01T00:00:00"
);
// While ISO 8601 specifies a minimum of 4 year digits we are lenient in
// what we accept.
// While W3C XMLSchema specifies a minimum of 4 year digits we are lenient
// in what we accept.
doTest
(
util
::
DateTime
(
0
,
0
,
0
,
0
,
1
,
1
,
1
),
"1-01-01T00:00:00"
,
"0001-01-01T00:00:00"
);
doTestDateTimeF
(
"+0001-01-01T00:00:00"
);
// invalid: ^+
doTestDateTimeF
(
"0001-1-01T00:00:00"
);
// invalid: < 2 M
doTestDateTimeF
(
"0001-01-1T00:00:00"
);
// invalid: < 2 D
doTestDateTimeF
(
"0001-01-01T0:00:00"
);
// invalid: < 2 H
...
...
sax/source/tools/converter.cxx
Dosyayı görüntüle @
a97a5310
...
...
@@ -1352,16 +1352,11 @@ bool Converter::convertDateOrDateTime(
//Negative Number
++
nPos
;
}
else
if
(
sal_Unicode
(
'+'
)
==
string
[
nPos
])
{
//Positive Number, explicit AD/CE
++
nPos
;
}
}
sal_Int32
nYear
(
0
);
{
// While
ISO 8601
specifies years with a minimum of 4 digits, be
// While
W3C XMLSchema
specifies years with a minimum of 4 digits, be
// leninent in what we accept for years < 1000. One digit is acceptable
// if the remainders match.
bSuccess
=
readDateTimeComponent
(
string
,
nPos
,
nYear
,
1
,
false
);
...
...
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