[1.1] Implement XPath functions: days-to-date and seconds-to-dateTime

RESOLVED FIXED

Status

RESOLVED FIXED
11 years ago
2 years ago

People

(Reporter: msterlin, Assigned: msterlin)

Tracking

({fixed1.8.1.17})

Trunk
x86
Windows XP
fixed1.8.1.17

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments, 4 obsolete attachments)

(Assignee)

Description

11 years ago
User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9b4pre) Gecko/2008022816 Minefield/3.0b4pre

Need to implement 1.1 XPath functions days-to-date() and seconds-to-dateTime().


Reproducible: Always
(Assignee)

Comment 1

11 years ago
Created attachment 306424 [details]
testcase: days-to-date()
(Assignee)

Comment 2

11 years ago
Created attachment 306425 [details]
testcase: seconds-to-dateTime()
(Assignee)

Comment 3

11 years ago
Created attachment 306427 [details] [diff] [review]
patch
Attachment #306427 - Flags: review?(aaronr)
(Assignee)

Comment 4

11 years ago
Created attachment 306443 [details] [diff] [review]
patch2

Forgot to change the uuid in patch1.
Attachment #306427 - Attachment is obsolete: true
Attachment #306443 - Flags: review?(aaronr)
Attachment #306427 - Flags: review?(aaronr)
(Assignee)

Comment 5

11 years ago
Created attachment 306444 [details] [diff] [review]
patch for 1.8 branch

Updated

11 years ago
Assignee: nobody → msterlin
Status: UNCONFIRMED → NEW
Ever confirmed: true

Updated

11 years ago
Attachment #306443 - Flags: review?(aaronr) → review+
(Assignee)

Updated

11 years ago
Status: NEW → ASSIGNED
(Assignee)

Updated

11 years ago
Attachment #306443 - Flags: review?(Olli.Pettay)

Updated

11 years ago
Attachment #306443 - Flags: review?(Olli.Pettay) → review+
(Assignee)

Updated

11 years ago
Attachment #306444 - Flags: review?(aaronr)
(Assignee)

Updated

11 years ago
Attachment #306444 - Flags: review?(Olli.Pettay)

Updated

11 years ago
Attachment #306444 - Flags: review?(Olli.Pettay) → review+

Comment 6

11 years ago
Comment on attachment 306444 [details] [diff] [review]
patch for 1.8 branch

>Index: transformiix/source/xpath/XFormsFunctionCall.cpp
>===================================================================

>+    case DAYSTODATE:
>+    {
...
>+        // Convert the time to xsd:date format.
>+        PRExplodedTime et;
>+        PR_ExplodeTime(t_usec, PR_GMTParameters, &et);
>+        char ctime[60];
>+        PR_FormatTime(ctime, sizeof(ctime), "%Y-%m-%d", &et);
>+        date.AppendLiteral(ctime);

when I checked in your patch for event context info stuff into 1.8 branch, the Linux builds didn't like AppendLiteral passing in a variable.  Please use AppendASCII instead.


>+    case SECONDSTODATETIME:
>+    {
...
>+
>+        // Convert the time to xsd:dateTime format.
>+        PRExplodedTime et;
>+        PR_ExplodeTime(t_usec, PR_GMTParameters, &et);
>+        char ctime[60];
>+        PR_FormatTime(ctime, sizeof(ctime), "%Y-%m-%dT%H:%M:%SZ", &et);
>+        dateTime.AppendLiteral(ctime);

same here

With those fixed, r=me
Attachment #306444 - Flags: review?(aaronr) → review+
(Assignee)

Comment 7

11 years ago
Created attachment 310048 [details] [diff] [review]
patch2 for 1.8 branch

Changing AppendLiteral to AppendASCII
Attachment #306444 - Attachment is obsolete: true

Comment 8

11 years ago
Created attachment 312111 [details] [diff] [review]
patch for checkin - trunk

updated to trunk
Attachment #306443 - Attachment is obsolete: true

Comment 9

11 years ago
checked into trunk for msterlin
Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch-11

Comment 10

11 years ago
Comment on attachment 310048 [details] [diff] [review]
patch2 for 1.8 branch

changes are only for the xforms xpath evaluator which is only used by xforms.
Attachment #310048 - Flags: superreview?(jonas)
Comment on attachment 310048 [details] [diff] [review]
patch2 for 1.8 branch

Per previous mailing the xforms-only code in transformiix doesn't need reviews.

Unless you specifically want me to look over it of course.
Attachment #310048 - Flags: superreview?(jonas)

Comment 12

10 years ago
Created attachment 331449 [details] [diff] [review]
updated patch2 for 1.8 branch

updated patch2 for 1.8 branch to current level of code
Attachment #310048 - Attachment is obsolete: true

Comment 13

10 years ago
checked into 1.8 branch for msterlin
Keywords: fixed1.8.1.17
Whiteboard: xf-to-branch-11
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.