[Mashup-dev] [commons-dev] svn commit r19651 - trunk/commons/dynamic-codegen/src
Keith Chapman
keith at wso2.com
Sat Jul 19 23:05:18 PDT 2008
Jonathan the build date operation of the version service was failing. I
fixed it by using substr instead of substring. Can you have a look at
this change please. Just to make sure that I didn't break anything.
I also editing the location of WSRequset in template-html.xslt to be
relative instead of absolute.
Thanks,
Keith.
keith at wso2.com wrote:
> Author: keith
> Date: Sat Jul 19 21:50:29 2008
> New Revision: 19651
> URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19651
>
> Log:
> Fixing an issue when the service returns dateTime. Should be using substr instead of substring
>
>
> Modified:
> trunk/commons/dynamic-codegen/src/jsstub.xslt
>
> Modified: trunk/commons/dynamic-codegen/src/jsstub.xslt
> URL: http://wso2.org/svn/browse/wso2/trunk/commons/dynamic-codegen/src/jsstub.xslt?rev=19651&r1=19650&r2=19651&view=diff
> ==============================================================================
> --- trunk/commons/dynamic-codegen/src/jsstub.xslt (original)
> +++ trunk/commons/dynamic-codegen/src/jsstub.xslt Sat Jul 19 21:50:29 2008
> @@ -421,7 +421,7 @@
> var era, year, month, day, hour, minute, second, millisecond;
>
> // parse date, if there is one.
> - if (buffer.substring(p,1) == '-')
> + if (buffer.substr(p,1) == '-')
> {
> era = -1;
> p++;
> @@ -431,11 +431,11 @@
>
> if (buffer.charAt(p+2) != ':')
> {
> - year = era * buffer.substring(p,4);
> + year = era * buffer.substr(p,4);
> p += 5;
> - month = buffer.substring(p,2);
> + month = buffer.substr(p,2);
> p += 3;
> - day = buffer.substring(p,2);
> + day = buffer.substr(p,2);
> p += 3;
> } else {
> year = 1970;
> @@ -446,11 +446,11 @@
> // parse time, if there is one
> if (buffer.charAt(p) != '+' && buffer.charAt(p) != '-')
> {
> - hour = buffer.substring(p,2);
> + hour = buffer.substr(p,2);
> p += 3;
> - minute = buffer.substring(p,2);
> + minute = buffer.substr(p,2);
> p += 3;
> - second = buffer.substring(p,2);
> + second = buffer.substr(p,2);
> p += 2;
> if (buffer.charAt(p) == '.')
> {
> @@ -475,9 +475,9 @@
> if (buffer.charAt(p) != 'Z' && buffer.charAt(p) != '') {
> var sign = (buffer.charAt(p) == '-' ? -1 : +1);
> p++;
> - tzhour = sign * buffer.substring(p,2);
> + tzhour = sign * buffer.substr(p,2);
> p += 3;
> - tzminute = sign * buffer.substring(p,2);
> + tzminute = sign * buffer.substr(p,2);
> }
>
> var thisDate = new Date();
>
> _______________________________________________
> Commons-dev mailing list
> Commons-dev at wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/commons-dev
>
More information about the Mashup-dev
mailing list