GWT: date format changing itself in firefox when run on server - gwt

In my GWT application , i am displaying some dates , which are displaying in different format in chrome .. and different in Firefox ..
in chrome i am having this
9/7/2013 6:23:03 PM
in firefox its showing as
Saturday, September 07, 2013 6:23:03 PM
I am not changin format anywhere ...
I like the date to be same (as in chrome)
Note: it works fine and shows same format(as in chrome), but when i run on localhost it shows different format ..
any idea , what could be the solution
thanks

Use the GWT DateTimeFormat to show dates in a uniform manner. DateTimeFormat.getFormat("MM/dd/yyyy h:mm:ss a").format(YOUR_DATE); will give you a String.

Related

iMacros - Change date Format

I have an iMacros script working with data extracted from csv file.
I am trying to change a format date different as is extracted from my csv file.
I need
08-24-2022 to be replaced with Aug 24, 2022
basically d-mmm-yy with mmm d, yyyy
I tried something like this,, don't know how to make it work, Thank you for support!
SET date "08-24-2022"
SET dateFormatted EVAL("\"{{date}}\".replace(/(\\d{4})-(\\d\\d)-(\\d\\d)/, \"$2 $3, $1\");")
PROMPT {{dateFormatted}}
I am using:
Browser: Google Chrome Version 105.0.5195.102 (Official Build) (64-bit)
iMacros Personal Edition License - Addon for Chrome -Version 10.1.1
Windows 10 (64-bit)
One "easy" Implementation: Declare the Months yourself in a Var/Array and use the Month Number as Index (to re-split() the Array into the 12 Months) to convert it to the mmm Format, stg like:
VERSION BUILD=8820413 RECORDER=FX
TAB T=1
SET date "08-24-2022"
'SET dateFormatted EVAL("\"{{date}}\".replace(/(\\d{4})-(\\d\\d)-(\\d\\d)/, \"$2 $3, $1\");")
SET Months _Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec_
SET dateFormatted EVAL("var d='{{date}}', m='{{Months}}', x,y,z; x=d.split('-'); y=m.split('_')[x[0]*1]; z=y+' '+x[1]+', '+x[2]; z;")
PROMPT _{{dateFormatted}}_
For Date="08-24-2022", this will output Aug 24, 2022.
For Date="08-04-2022", this will output Aug 04, 2022.
(=> Use x[1]*1 instead of x[1] in z if you would prefer Aug 4, 2022 for 1-Digit Dates from 01-09 to remove the Leading 0...)
(Written and tested in iMacros for FF v8.8.2, PM v26.3.3, Win10_PRO_21H2.)

Google STT - German - Full numeric date not transcribed properly

I am currently experimenting with Google's STT engine for the german language. I am looking to capture full dates from an utterance. This works fine as long as I utter the month as a word (September, October..) "Erster Januar 1980" is transcribed correctly.
In german it is common to not say the name of the month, but just the ordinal number of the month like "Erster Erster Neunzehnhundertachtzig", where the first word is the day, the second the month followed by the year. Uttering this, the google engine returns only garbage. I have also tried it with MS Azure and it works fine.
My question is now: Has anyone else stumbled over this, and maybe has a hint how to work around this problem? I have already tried to add a SpeechContext $FULLDATE but it does not make a difference.
Cheers
S
Update 2022
A new Dynamic Class Token $OOV_CLASS_FULLDATE has been introduced and it is available for de-DE, de-AT and de-CH language codes.

OpenRefine toDate() conversion fail

I have a sensor log file with dates in the form Mon Nov 30 18:21:40 UTC 2020 that I'd like to convert to OpenRefine dates.
Per GREL Date Functions, I thought the correct transformation would be value.toDate('E M d H:m:s z y'), but I consistently get "Error: Unable to convert to a date".
I've tried simple things like replacing UTC with GMT, without success.
What clue am I missing?
That's a weird date format. I'm not sure why a sensor log wouldn't just use ISO 8601.
Try using value.toDate('EEE MMM d H:m:s Z y').
It's not super obvious from the docs that you need multiple characters, but if you look at the examples at the bottom of this page, you can see them used there.
https://docs.oracle.com/javase/7/docs/api/java/text/SimpleDateFormat.html

How to set date locale in mailchimp?

I need to change the mailchimp locale *|DATE:M y|*. This gives Apr 2013 and I want Abr 2013 (Portuguese format). Is there any way to do this?
Thanks!
Have you tried wrapping the date with a translate merge tag?
*|TRANSLATE:PT|* *|DATE:M y|*
http://blog.mailchimp.com/automatically-translate-your-emails-to-over-30-languages/
The list of language codes can be found here:
http://kb.mailchimp.com/article/is-it-possible-to-translate-content-in-multiple-languages
But the Portugese options are:
Portuguese (Brazil) = pt
Portuguese (Portugal) = pt_PT
There you go
setlocale(LC_ALL, 'pt_PT');
echo strftime("%b %d %Y");
this will output
Abr 18 2013
To format dates in other languages, you need to use the setlocale() and strftime() functions

Why does my Falcon script print the date a month ahead instead of today's date?

Today is April 25, 2009 which in US format is abbreviated month-day-year, so today is 04-25-09. This line
> CurrentTime().toString("%m-%d-%y")
should print "04-25-09". Instead it prints "05-25-09". Why is that? According to the docs CurrentTime() returns a TimeStamp instance. TimeStamp has a toString() method which accepts a date/time format as a parameter, which is supposed to be in
strftime format. Is there something wrong with my understanding of the code? I am using Falcon 0.8.14.2("Vulture") on Windows Vista (64-bit)
2: http://linux.die.net/man/3/strftime strftime format
I also posted this question on the Falcon Google Group. Apparently, this is an issue with Falcon itself and is fixed in version 0.9.1. Version 0.9.1 will be officially released in a week or two according to the response I received from Giancarlo Niccolai, the inventor of the Falcon programming language.