-
24 Apr 2009 8:00 AM #1
Ext.fc.fuzzyDate - a nice way to present date and time
Ext.fc.fuzzyDate - a nice way to present date and time

About
The FuzzyDate plugin was inspired by the TimeAgo plugin for jQuery . I needed something similar for ExtJs. Since i didn't find it I decided to build one for ExtJs.
The ideia is instead of showing a timestamp to the user show a more friendly message like one hour ago or 3 months from now
Features- Updates timestamps automatically, avoiding timestamps dated "1 minute ago" even though the page was opened 10 minutes ago
- Multiple languages supported
- Fully Customizable
- You can define several date formats that will be used to convert the date string to an Ext Date object
- if don't need automatic updates neither want to have it atached to an element you can simply get the translated date with the translate() function
Download
http://francodacosta.com/demos/extjs/fuzzydate/
Cheers
Nuno
-
24 Apr 2009 3:57 PM #2
was looking for a long time ago
was looking for a long time ago
thnx for sharing,
i once stumbled on this and it certainly impressed me
thnx for porting this nice widget
+1
-
1 May 2009 12:30 PM #3
Awesome! A perfect fit with TwitterPanel ux

-
5 May 2009 2:29 AM #4Sencha - Sales Team
- Join Date
- Mar 2007
- Location
- Melbourne, Australia (aka GMT+10)
- Posts
- 753
- Vote Rating
- 6
Sweet... this will great for last login wording!!
@MD... ah so sad... please don't degrade Ext to use with Flutter... er twitter!Sencha Technical Sales & Senior Technical Trainer
Sencha Inc
Register with discount code "ASA357" and save $100

The new SenchaWorld.com is coming in July, more details closer to SenchaCon
Code Validation : JSLint | JSONLint | JSONPLint
-
16 Jul 2009 2:16 PM #5
-
17 Jul 2009 2:46 AM #6
Hi - wondering, i didn't see that. I just write a twitter ux as i used it in my applications (TYPO3), it's like this: http://dev.sk-typo3.de/cetest/web-widgets/twitter.html
@francodacosta thx, i will test. One problem i see is the localization. This is a tricky one.vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5
energlobe.de - german online magazine
-
21 Jul 2009 10:25 PM #7
something is wrong here...
When i try following sample:
firebug says : TypeError: options is undefined Line 176Code:var f = new Ext.fc.fuzzyDate(); alert ( f.translate('2009-12-25') );
is options a required parameter when use translate()?
Bye, Dumbledore
-
24 Jul 2009 7:20 AM #8
Hi Dumbledore,
options should be optional
just add this after line 175
if(!options) options = processOptions({}) ;
cheers
-
28 Jul 2009 8:47 AM #9
is it possible to make a config a la:
show me fuzzydates about now - 3 month, else show normal dates?
Bye, Dumbledore
-
4 Aug 2009 8:40 PM #10
i change the translate function to this:
so it is possible to set only a small set of options like the translation. In the original i must set all options...Code:, translate: function(str, options) { var opt = {}; Ext.apply(opt, options, processOptions({})); var d = parseDate(str, opt.dateFormats); if (d) { return (dateTimeToString(d, opt)); } else { if (opt.onErrorWriteTitle) return (str); } return false; }
Perhaps it helps...
Bye DumbledoreLast edited by mystix; 4 Aug 2009 at 10:50 PM. Reason: why can't you format your code for readability... it only takes 2 seconds...


Reply With Quote



