Gwendal Roué
|
df6bb8761c
|
Swiftlint + whitespace
|
2019-07-01 08:57:53 +02:00 |
|
Gwendal Roué
|
403c4a894f
|
Apply lovely advice from @glessard
|
2019-03-06 18:18:15 +01:00 |
|
David Hart
|
d601e06f25
|
Fix buffer overflow in vsscanf date parsing
|
2018-05-31 17:07:23 +02:00 |
|
Gwendal Roué
|
c1c3233ba2
|
Remove two useless .init (thank you Xcode autocomplete)
|
2018-05-07 19:23:33 +02:00 |
|
Gwendal Roué
|
6c5d6ba631
|
SQLiteDateParser: tighten vsscanf format
|
2018-04-21 10:37:03 +02:00 |
|
Gwendal Roué
|
1311f6c87c
|
SQLiteDateParser: fix nanosecond parsing
|
2018-04-21 10:17:07 +02:00 |
|
Gwendal Roué
|
632bce5521
|
SQLiteDateParser: don't parse garbage into nanoseconds
|
2018-04-20 19:41:34 +02:00 |
|
Gwendal Roué
|
316d28746b
|
SQLiteDateParser: optimize nanoseconds parsing
|
2018-04-20 19:26:42 +02:00 |
|
Gwendal Roué
|
9efe4a6efa
|
Add a sanity check
|
2018-04-20 19:18:46 +02:00 |
|
Gwendal Roué
|
8915672ce5
|
SQLiteDateParser: parse C strings
Since the goal of this PR is efficiency, we'll soon parse Date and
DatabaseDateComponents right from raw SQLite buffers.
|
2018-04-20 13:51:20 +02:00 |
|
Gwendal Roué
|
0640f90fc1
|
(whitespace)
|
2018-04-20 13:32:50 +02:00 |
|
Gwendal Roué
|
d1a0e8d906
|
SQLiteDateParser.components(from:) is not public
|
2018-04-20 13:31:57 +02:00 |
|
Gwendal Roué
|
e9a668ca56
|
SQLiteDateParser: no more static methods
|
2018-04-20 13:31:35 +02:00 |
|
Gwendal Roué
|
27194c802d
|
SQLiteDateParser: use withUnsafeMutablePointer instead of allocations
OK, not really: the nanosecond components remains in the heap.
But we may find a way to put 11 chars on the stack.
|
2018-04-20 13:30:26 +02:00 |
|
Gwendal Roué
|
7aabfeaeac
|
SQLiteDateParser: get rid of the mutex
|
2018-04-20 13:09:22 +02:00 |
|
Matt Greenfield
|
3b546dedd8
|
truncate nanosecond precision to 3 sig figs
|
2018-04-17 15:17:09 +07:00 |
|
Matt Greenfield
|
33066133fc
|
truncate date/time strings that include seconds precision beyond the nanosecond scale
|
2018-04-17 14:32:33 +07:00 |
|
Matt Greenfield
|
dad163771f
|
not all nanosecond fractions have 3 sig figs, so can't hard code the acceptable string lengths
|
2018-04-17 12:38:23 +07:00 |
|
Matt Greenfield
|
bb59f5e6f7
|
0.123 is not the same thing as 0.000123
|
2018-04-17 11:05:47 +07:00 |
|
Matt Greenfield
|
7a1aa88edb
|
fractions of seconds are not the same thing as integer counts of nanoseconds
|
2018-04-16 19:18:49 +07:00 |
|
Matt Greenfield
|
b444d376f4
|
differentiate between SS and SS.SSS formats
|
2018-04-16 17:39:41 +07:00 |
|
Matt Greenfield
|
59d7909f50
|
return correct Format for partial date/time combinations
|
2018-04-16 17:21:00 +07:00 |
|
Matt Greenfield
|
362c4baeca
|
initial scanf() based date string parser
|
2018-04-16 14:02:15 +07:00 |
|