We've had a couple suggestions to do away with the relative_created_at attribute that we include our API output. Because the value is relative, it changes between requests and ruins most caching strategies.
We will be removing relative_created_at in seven days (Tuesday, April 27th). Please change your code accordingly.
Thanks, and do let us know if we can do anything date/time related to make parsing easier for you.
> We've had a couple suggestions to do away with the > relative_created_at attribute that we include our API output. > Because the value is relative, it changes between requests and > ruins most caching strategies.
> We will be removing relative_created_at in seven days (Tuesday, > April 27th). Please change your code accordingly.
> Thanks, and do let us know if we can do anything date/time related > to make parsing easier for you.
> seven days? as in about a week? or about a month (Tuesday, April > 27th)?
> On Mar 20, 2007, at 2:44 PM, Alex Payne wrote:
>> We've had a couple suggestions to do away with the >> relative_created_at attribute that we include our API output. >> Because the value is relative, it changes between requests and >> ruins most caching strategies.
>> We will be removing relative_created_at in seven days (Tuesday, >> April 27th). Please change your code accordingly.
>> Thanks, and do let us know if we can do anything date/time related >> to make parsing easier for you.
On Mar 20, 12:44 pm, Alex Payne <a...@al3x.net> wrote:
> We've had a couple suggestions to do away with the > relative_created_at attribute that we include our API output. > Because the value is relative, it changes between requests and ruins > most caching strategies.
hi all,
i hacked up this javascript "relative time" generator yesterday while putting together the tweetbar... it's based on the time distance code in Rails.
feel free to use it however you see fit:
function relative_time(time_value) { var parsed_date = (new Date).setTime(Date.parse(time_value));
var delta = parseInt(((new Date).getTime() - parsed_date.getTime()) / 1000);
mike wrote: > i hacked up this javascript "relative time" generator yesterday while > putting together the tweetbar... it's based on the time distance code > in Rails.
> feel free to use it however you see fit:
Thanks mike .. that's excellent.
Below I've re-written the same logic in perl for those of us using perl.
Cheers! Rick Measham
# This code uses DateTime as that's what I use. use DateTime::Format::HTTP;
sub relative_time { my $time_value = shift;
my $parsed_date = DateTime::Format::HTTP->parse_datetime($time_value)->epoch; my $now = DateTime->now()->epoch;
On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote:
> mike wrote: > > i hacked up this javascript "relative time" generator yesterday while > > putting together the tweetbar... it's based on the time distance code > > in Rails.
> > feel free to use it however you see fit:
> Thanks mike .. that's excellent.
> Below I've re-written the same logic in perl for those of us using perl.
and here it is in python :) -- the only thing I hacked in was to remove the +0000 from the string as I believe the time is returned to us as localtime. If it's not then switch localtime() with gmtime() below :)
def relative_time(dateString): """ Take the created_at timestamp string and convert it to a relative text expression """ date = dateString.replace(' +0000', '') parsed = mktime(strptime(date, '%a %b %d %H:%M:%S %Y')) now = mktime(localtime()) delta = now - parsed
if delta < 60: return 'less than a minute ago' elif delta < 120: return 'about a minute ago' elif delta < _partialMinute: return '%d minutes ago' % (delta / 60) elif delta < _partialHour: return 'about an hour ago' elif delta < _fullDay: return 'about %d hours ago' % (delta / 3600) elif delta < _twoDays: return '1 day ago' else: return '%d days ago' % (delta / 86400)
print relative_time('Wed Mar 07 09:32:51 +0000 2007') print relative_time('Tue Mar 20 20:08:00 +0000 2007')
> On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > mike wrote: > > > i hacked up this javascript "relative time" generator yesterday while > > > putting together the tweetbar... it's based on the time distance code > > > in Rails.
> > > feel free to use it however you see fit:
> > Thanks mike .. that's excellent.
> > Below I've re-written the same logic in perl for those of us using perl.
> and here it is in python :) -- the only thing I hacked in was to > remove the +0000 from the string as I believe the time is returned to > us as localtime. If it's not then switch localtime() with gmtime() > below :)
> def relative_time(dateString): > """ > Take the created_at timestamp string and convert > it to a relative text expression > """ > date = dateString.replace(' +0000', '') > parsed = mktime(strptime(date, '%a %b %d %H:%M:%S %Y')) > now = mktime(localtime()) > delta = now - parsed
> > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > mike wrote: > > > > i hacked up this javascript "relative time" generator yesterday while > > > > putting together the tweetbar... it's based on the time distance code > > > > in Rails.
> > > > feel free to use it however you see fit:
> > > Thanks mike .. that's excellent.
> > > Below I've re-written the same logic in perl for those of us using perl.
> > and here it is in python :) -- the only thing I hacked in was to > > remove the +0000 from the string as I believe the time is returned to > > us as localtime. If it's not then switch localtime() with gmtime() > > below :)
> > > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > > mike wrote: > > > > > i hacked up this javascript "relative time" generator yesterday > while > > > > > putting together the tweetbar... it's based on the time distance > code > > > > > in Rails.
> > > > > feel free to use it however you see fit:
> > > > Thanks mike .. that's excellent.
> > > > Below I've re-written the same logic in perl for those of us using > perl.
> > > and here it is in python :) -- the only thing I hacked in was to > > > remove the +0000 from the string as I believe the time is returned to > > > us as localtime. If it's not then switch localtime() with gmtime() > > > below :)
> > > from time import strptime, mktime, localtime
I updated the python-twitter library to automatically generate a value for relative_created_at value. The change should be transparent for existing users of the library.
Also, I noticed that there are inconsistencies in the styles and formats people are using to generate the relative created at string. Since I haven't found a well-defined set of rules, I made up some of my own. When Twitter publishes something official then I will update the library to conform.
The new version is available in the subversion trunk, and I'd still love someone to try it out and let me know if I missed anything. I'm holding off on a full release until I find out if there are any more API changes I should incorporate.
Thanks!
-DeWitt
On 3/20/07, Chris Messina <chris.mess...@gmail.com> wrote:
> > > > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > > > mike wrote: > > > > > > i hacked up this javascript "relative time" generator yesterday > > while > > > > > > putting together the tweetbar... it's based on the time > distance > > code > > > > > > in Rails.
> > > > > > feel free to use it however you see fit:
> > > > > Thanks mike .. that's excellent.
> > > > > Below I've re-written the same logic in perl for those of us using > > perl.
> > > > and here it is in python :) -- the only thing I hacked in was to > > > > remove the +0000 from the string as I believe the time is returned > to > > > > us as localtime. If it's not then switch localtime() with gmtime() > > > > below :)
> > > > from time import strptime, mktime, localtime
I've written the logic for flash AS2.0 I tried adding to the wiki but didnt have the password.
I've also broken the date conversion out into a seperate utility function. Also changed elseif's to a switch just because im anal and like the cleanliness of a switch =). /** * getDateFromString() * @param str String - date in Thu Jul 8 12:48:23 GMT+0800 2004 format * @return date - date in flash format */ function getDateFromString(str:String):Date { var m = {Jan:0, Feb:1, Mar:2, Apr:3, May:4, Jun:5, Jul:6, Aug: 7, Sep:8, Oct:9, Nov:10, Dec:11}; var dArr:Array = str.split(' '); var tArr:Array = dArr[3].split(':');
return new Date(Date.UTC(dArr[5], m[dArr[1]], dArr[2], tArr[0], tArr[1], tArr[2]));
//return new Date(Date.UTC(Number(dArr[5]), m[dArr[1]], Number(dArr[2]), (Number(tArr[0])-Number(dArr[4].substring(3, 6))), (Number(tArr[1])-Number(dArr[4].substring(6, 8))), Number(tArr[2]))); } /** * relative_time() * @param time_value - date in Thu Jul 8 12:48:23 GMT+0800 2004 format * @return string */ function relative_time(time_value):String { var parsed_date:Date = getDateFromString(time_value); var relative_to:Date = new Date(); var dateDiff:Number = (relative_to.getTime() - parsed_date) / 1000;
switch(true){ case dateDiff < 60: return 'about a minute ago'; break; case dateDiff < 120: return 'about a minute ago'; break; case dateDiff < (45*60): return int(dateDiff / 60) + ' minutes ago'; break; case dateDiff < (90*60): return 'about an hour ago'; break; case dateDiff < (24*60*60): return 'about ' + int(dateDiff / 3600) + ' hours ago'; break; case dateDiff < (48*60*60): return '1 day ago'; break; default: return int(dateDiff / 86400) + ' days ago'; break; } }
On Mar 21, 4:09 pm, "DeWitt Clinton" <dclin...@gmail.com> wrote:
> I updated the python-twitter library to automatically generate a value for > relative_created_at value. The change should be transparent for existing > users of the library.
> Also, I noticed that there are inconsistencies in the styles and formats > people are using to generate the relative created at string. Since I > haven't found a well-defined set of rules, I made up some of my own. When > Twitter publishes something official then I will update the library to > conform.
> The new version is available in the subversion trunk, and I'd still love > someone to try it out and let me know if I missed anything. I'm holding off > on a full release until I find out if there are any more API changes I > should incorporate.
> Thanks!
> -DeWitt
> On 3/20/07, Chris Messina <chris.mess...@gmail.com> wrote:
> > > > On 3/20/07, bear <bea...@gmail.com> wrote:
> > > > > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > > > > mike wrote: > > > > > > > i hacked up this javascript "relative time" generator yesterday > > > while > > > > > > > putting together the tweetbar... it's based on the time > > distance > > > code > > > > > > > in Rails.
> > > > > > > feel free to use it however you see fit:
> > > > > > Thanks mike .. that's excellent.
> > > > > > Below I've re-written the same logic in perl for those of us using > > > perl.
> > > > > and here it is in python :) -- the only thing I hacked in was to > > > > > remove the +0000 from the string as I believe the time is returned > > to > > > > > us as localtime. If it's not then switch localtime() with gmtime() > > > > > below :)
> > > > > from time import strptime, mktime, localtime
> I've written the logic for flash AS2.0 I tried adding to the wiki but > didnt have the password.
> I've also broken the date conversion out into a seperate utility > function. Also changed elseif's to a switch just because im anal and > like the cleanliness of a switch =). > /** > * getDateFromString() > * @param str String - date in Thu Jul 8 12:48:23 GMT+0800 2004 > format > * @return date - date in flash format > */ > function getDateFromString(str:String):Date > { > var m = {Jan:0, Feb:1, Mar:2, Apr:3, May:4, Jun:5, Jul:6, Aug: > 7, Sep:8, Oct:9, Nov:10, Dec:11}; > var dArr:Array = str.split(' '); > var tArr:Array = dArr[3].split(':');
> return new Date(Date.UTC(dArr[5], m[dArr[1]], dArr[2], tArr[0], > tArr[1], tArr[2]));
> //return new Date(Date.UTC(Number(dArr[5]), m[dArr[1]], > Number(dArr[2]), (Number(tArr[0])-Number(dArr[4].substring(3, 6))), > (Number(tArr[1])-Number(dArr[4].substring(6, 8))), Number(tArr[2]))); > } > /** > * relative_time() > * @param time_value - date in Thu Jul 8 12:48:23 GMT+0800 2004 > format > * @return string > */ > function relative_time(time_value):String > { > var parsed_date:Date = getDateFromString(time_value); > var relative_to:Date = new Date(); > var dateDiff:Number = (relative_to.getTime() - parsed_date) / 1000;
> switch(true){ > case dateDiff < 60: > return 'about a minute ago'; > break; > case dateDiff < 120: > return 'about a minute ago'; > break; > case dateDiff < (45*60): > return int(dateDiff / 60) + ' minutes ago'; > break; > case dateDiff < (90*60): > return 'about an hour ago'; > break; > case dateDiff < (24*60*60): > return 'about ' + int(dateDiff / 3600) + ' hours ago'; > break; > case dateDiff < (48*60*60): > return '1 day ago'; > break; > default: > return int(dateDiff / 86400) + ' days ago'; > break; > } > }
> On Mar 21, 4:09 pm, "DeWitt Clinton" <dclin...@gmail.com> wrote:
> > Hi all,
> > I updated the python-twitter library to automatically generate a value for > > relative_created_at value. The change should be transparent for existing > > users of the library.
> > Also, I noticed that there are inconsistencies in the styles and formats > > people are using to generate the relative created at string. Since I > > haven't found a well-defined set of rules, I made up some of my own. When > > Twitter publishes something official then I will update the library to > > conform.
> > The new version is available in the subversion trunk, and I'd still love > > someone to try it out and let me know if I missed anything. I'm holding off > > on a full release until I find out if there are any more API changes I > > should incorporate.
> > Thanks!
> > -DeWitt
> > On 3/20/07, Chris Messina <chris.mess...@gmail.com> wrote:
> > > > > On 3/20/07, bear <bea...@gmail.com> wrote:
> > > > > > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > > > > > mike wrote: > > > > > > > > i hacked up this javascript "relative time" generator yesterday > > > > while > > > > > > > > putting together the tweetbar... it's based on the time > > > distance > > > > code > > > > > > > > in Rails.
> > > > > > > > feel free to use it however you see fit:
> > > > > > > Thanks mike .. that's excellent.
> > > > > > > Below I've re-written the same logic in perl for those of us using > > > > perl.
> > > > > > and here it is in python :) -- the only thing I hacked in was to > > > > > > remove the +0000 from the string as I believe the time is returned > > > to > > > > > > us as localtime. If it's not then switch localtime() with gmtime() > > > > > > below :)
> > > > > > from time import strptime, mktime, localtime
> Blah please note do not include that last commented return statment... > my bad.
> On Mar 25, 12:41 pm, "Harakiro" <jle.edwa...@gmail.com> wrote: > > I've written the logic for flash AS2.0 I tried adding to the wiki but > > didnt have the password.
> > I've also broken the date conversion out into a seperate utility > > function. Also changed elseif's to a switch just because im anal and > > like the cleanliness of a switch =). > > /** > > * getDateFromString() > > * @param str String - date in Thu Jul 8 12:48:23 GMT+0800 2004 > > format > > * @return date - date in flash format > > */ > > function getDateFromString(str:String):Date > > { > > var m = {Jan:0, Feb:1, Mar:2, Apr:3, May:4, Jun:5, Jul:6, Aug: > > 7, Sep:8, Oct:9, Nov:10, Dec:11}; > > var dArr:Array = str.split(' '); > > var tArr:Array = dArr[3].split(':');
> > On Mar 21, 4:09 pm, "DeWitt Clinton" <dclin...@gmail.com> wrote:
> > > Hi all,
> > > I updated the python-twitter library to automatically generate a value for > > > relative_created_at value. The change should be transparent for existing > > > users of the library.
> > > Also, I noticed that there are inconsistencies in the styles and formats > > > people are using to generate the relative created at string. Since I > > > haven't found a well-defined set of rules, I made up some of my own. When > > > Twitter publishes something official then I will update the library to > > > conform.
> > > The new version is available in the subversion trunk, and I'd still love > > > someone to try it out and let me know if I missed anything. I'm holding off > > > on a full release until I find out if there are any more API changes I > > > should incorporate.
> > > Thanks!
> > > -DeWitt
> > > On 3/20/07, Chris Messina <chris.mess...@gmail.com> wrote:
> > > > Nice! Keep it coming!
> > > > On 3/20/07, bear <bea...@gmail.com> wrote:
> > > > > Great idea Chris!
> > > > > I've just edited the Python version to include some basic tests.
> > > > > On Mar 20, 8:40 pm, "Chris Messina" <chris.mess...@gmail.com> wrote: > > > > > > Any more, feel free to add them to the wiki:
> > > > > > > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > > > > > > mike wrote: > > > > > > > > > i hacked up this javascript "relative time" generator yesterday > > > > > while > > > > > > > > > putting together the tweetbar... it's based on the time > > > > distance > > > > > code > > > > > > > > > in Rails.
> > > > > > > > > feel free to use it however you see fit:
> > > > > > > > Thanks mike .. that's excellent.
> > > > > > > > Below I've re-written the same logic in perl for those of us using > > > > > perl.
> > > > > > > and here it is in python :) -- the only thing I hacked in was to > > > > > > > remove the +0000 from the string as I believe the time is returned > > > > to > > > > > > > us as localtime. If it's not then switch localtime() with gmtime() > > > > > > > below :)
> > > > > > > from time import strptime, mktime, localtime
> On 3/25/07, Harakiro <jle.edwa...@gmail.com> wrote:
> > Blah please note do not include that last commented return statment... > > my bad.
> > On Mar 25, 12:41 pm, "Harakiro" <jle.edwa...@gmail.com> wrote: > > > I've written the logic for flash AS2.0 I tried adding to the wiki but > > > didnt have the password.
> > > I've also broken the date conversion out into a seperate utility > > > function. Also changed elseif's to a switch just because im anal and > > > like the cleanliness of a switch =). > > > /** > > > * getDateFromString() > > > * @param str String - date in Thu Jul 8 12:48:23 GMT+0800 2004 > > > format > > > * @return date - date in flash format > > > */ > > > function getDateFromString(str:String):Date > > > { > > > var m = {Jan:0, Feb:1, Mar:2, Apr:3, May:4, Jun:5, Jul:6, Aug: > > > 7, Sep:8, Oct:9, Nov:10, Dec:11}; > > > var dArr:Array = str.split(' '); > > > var tArr:Array = dArr[3].split(':');
> > > On Mar 21, 4:09 pm, "DeWitt Clinton" <dclin...@gmail.com> wrote:
> > > > Hi all,
> > > > I updated the python-twitter library to automatically generate a value for > > > > relative_created_at value. The change should be transparent for existing > > > > users of the library.
> > > > Also, I noticed that there are inconsistencies in the styles and formats > > > > people are using to generate the relative created at string. Since I > > > > haven't found a well-defined set of rules, I made up some of my own. When > > > > Twitter publishes something official then I will update the library to > > > > conform.
> > > > The new version is available in the subversion trunk, and I'd still love > > > > someone to try it out and let me know if I missed anything. I'm holding off > > > > on a full release until I find out if there are any more API changes I > > > > should incorporate.
> > > > Thanks!
> > > > -DeWitt
> > > > On 3/20/07, Chris Messina <chris.mess...@gmail.com> wrote:
> > > > > Nice! Keep it coming!
> > > > > On 3/20/07, bear <bea...@gmail.com> wrote:
> > > > > > Great idea Chris!
> > > > > > I've just edited the Python version to include some basic tests.
> > > > > > On Mar 20, 8:40 pm, "Chris Messina" <chris.mess...@gmail.com> wrote: > > > > > > > Any more, feel free to add them to the wiki:
> > > > > > > > > Below I've re-written the same logic in perl for those of us using > > > > > > perl.
> > > > > > > > and here it is in python :) -- the only thing I hacked in was to > > > > > > > > remove the +0000 from the string as I believe the time is returned > > > > > to > > > > > > > > us as localtime. If it's not then switch localtime() with gmtime() > > > > > > > > below :)
> > > > > > > > from time import strptime, mktime, localtime
> > On 3/25/07, Harakiro <jle.edwa...@gmail.com> wrote:
> > > Blah please note do not include that last commented return statment... > > > my bad.
> > > On Mar 25, 12:41 pm, "Harakiro" <jle.edwa...@gmail.com> wrote: > > > > I've written the logic for flash AS2.0 I tried adding to the wiki but > > > > didnt have the password.
> > > > I've also broken the date conversion out into a seperate utility > > > > function. Also changed elseif's to a switch just because im anal and > > > > like the cleanliness of a switch =). > > > > /** > > > > * getDateFromString() > > > > * @param str String - date in Thu Jul 8 12:48:23 GMT+0800 2004 > > > > format > > > > * @return date - date in flash format > > > > */ > > > > function getDateFromString(str:String):Date > > > > { > > > > var m = {Jan:0, Feb:1, Mar:2, Apr:3, May:4, Jun:5, Jul:6, Aug: > > > > 7, Sep:8, Oct:9, Nov:10, Dec:11}; > > > > var dArr:Array = str.split(' '); > > > > var tArr:Array = dArr[3].split(':');
> > > > On Mar 21, 4:09 pm, "DeWitt Clinton" <dclin...@gmail.com> wrote:
> > > > > Hi all,
> > > > > I updated the python-twitter library to automatically generate a value for > > > > > relative_created_at value. The change should be transparent for existing > > > > > users of the library.
> > > > > Also, I noticed that there are inconsistencies in the styles and formats > > > > > people are using to generate the relative created at string. Since I > > > > > haven't found a well-defined set of rules, I made up some of my own. When > > > > > Twitter publishes something official then I will update the library to > > > > > conform.
> > > > > The new version is available in the subversion trunk, and I'd still love > > > > > someone to try it out and let me know if I missed anything. I'm holding off > > > > > on a full release until I find out if there are any more API changes I > > > > > should incorporate.
> > > > > Thanks!
> > > > > -DeWitt
> > > > > On 3/20/07, Chris Messina <chris.mess...@gmail.com> wrote:
> > > > > > > > > > Below I've re-written the same logic in perl for those of us using > > > > > > > perl.
> > > > > > > > > and here it is in python :) -- the only thing I hacked in was to > > > > > > > > > remove the +0000 from the string as I believe the time is returned > > > > > > to > > > > > > > > > us as localtime. If it's not then switch localtime() with gmtime() > > > > > > > > > below :)
> > > > > > > > > from time import strptime, mktime, localtime
Harakiro wrote: > I've written the logic for flash AS2.0 I tried adding to the wiki but > didnt have the password.
The password is on the front page of the wiki.
> I've also broken the date conversion out into a seperate utility > function.
I would have thought that as ActionScript is an ECMA script, the Date.parse() would have worked. However from reading the docs, you should be able to just give the HTTP format date (based on that in RFC822) to the Date constructor:
var parsed_date:Date = new Date(time_value);
If not that, there appears to be a parseRFC822() method.
I also note that in your delta (dateDiff) algorithm you convert one Date object into miliseconds but not the other. Of course it will still work as applying a math function to a Date object will use the getTime() result. But it would still be good to do one or the other to both dates.
Rick thanks for pointing out the error on the dateDiff stuff it is infact a typo. I was intending to use getTime for each.
In AS2 I dont belive the Date constructor can accept the a date in a "string" format. It's pretty specific in its format. Also flash starts its month array with 0 so you have to have that offset in the numbers there as well. Perhapse they've added the RFC822 into the contstructor in AS3, one can hope.
Date constructor in AS2 public Date([yearOrTimevalue:Number], [month:Number], [date:Number], [hour:Number], [minute:Number], [second:Number], [millisecond:Number])
Also thanks ill find the password and fix the typo mentioned above.
Jesse
On Mar 25, 5:17 pm, Rick Measham <r...@isite.net.au> wrote:
> Harakiro wrote: > > I've written the logic for flash AS2.0 I tried adding to the wiki but > > didnt have the password.
> The password is on the front page of the wiki.
> > I've also broken the date conversion out into a seperate utility > > function.
> I would have thought that as ActionScript is an ECMA script, the > Date.parse() would have worked. However from reading the docs, you > should be able to just give the HTTP format date (based on that in > RFC822) to the Date constructor:
> var parsed_date:Date = new Date(time_value);
> If not that, there appears to be a parseRFC822() method.
> I also note that in your delta (dateDiff) algorithm you convert one Date > object into miliseconds but not the other. Of course it will still work > as applying a math function to a Date object will use the getTime() > result. But it would still be good to do one or the other to both dates.
> Rick thanks for pointing out the error on the dateDiff stuff it is > infact a typo. I was intending to use getTime for each.
> In AS2 I dont belive the Date constructor can accept the a date in a > "string" format. It's pretty specific in its format. Also flash starts > its month array with 0 so you have to have that offset in the numbers > there as well. Perhapse they've added the RFC822 into the contstructor > in AS3, one can hope.
> Date constructor in AS2 > public Date([yearOrTimevalue:Number], [month:Number], [date:Number], > [hour:Number], [minute:Number], [second:Number], [millisecond:Number])
> Also thanks ill find the password and fix the typo mentioned above.
> Jesse
> On Mar 25, 5:17 pm, Rick Measham <r...@isite.net.au> wrote:
> > Harakiro wrote: > > > I've written the logic for flash AS2.0 I tried adding to the wiki but > > > didnt have the password.
> > The password is on the front page of the wiki.
> > > I've also broken the date conversion out into a seperate utility > > > function.
> > I would have thought that as ActionScript is an ECMA script, the > > Date.parse() would have worked. However from reading the docs, you > > should be able to just give the HTTP format date (based on that in > > RFC822) to the Date constructor:
> > var parsed_date:Date = new Date(time_value);
> > If not that, there appears to be a parseRFC822() method.
> > I also note that in your delta (dateDiff) algorithm you convert one Date > > object into miliseconds but not the other. Of course it will still work > > as applying a math function to a Date object will use the getTime() > > result. But it would still be good to do one or the other to both dates.
Is there any update regarding official documentation on the upcoming API changes? I'd like to push out version 0.2 of the python library, and the first release of a parallel Java library that I wrote, but I'm reluctant to do so until I know for sure what is changing in the API.
Since Alex mentioned that at the very least, relative_created_at is going away tomorrow (the 27th) this would presumably need to be done today.
Other than the deprecation of relative_created_at, there's nothing in the API changes that's going to negatively impact existing applications. Everything that's been added lately is all convenience methods. I still intend to put up official docs. I'll try to knock those out today.
-- Alex
On Mar 26, 2007, at 10:32 AM, DeWitt Clinton wrote:
> Is there any update regarding official documentation on the > upcoming API changes? I'd like to push out version 0.2 of the > python library, and the first release of a parallel Java library > that I wrote, but I'm reluctant to do so until I know for sure what > is changing in the API.
> Since Alex mentioned that at the very least, relative_created_at is > going away tomorrow (the 27th) this would presumably need to be > done today.
> Thanks!
> -DeWitt
> On 3/25/07, bear <bea...@gmail.com> wrote: > I actually think the password on the page is wrong - I looked in the > page history and see that someone has changed the first letter
> Probably need to get Mr.Messina to look at that
> On Mar 25, 9:33 pm, "Harakiro" < jle.edwa...@gmail.com> wrote: > > I must be doing something wrong. I've registered with pbwiki.
> > I try to join the wiki with twitter and sweety and it says it > does not > > exist.
> > I try to edit the page and enter the password on the page sweety and > > it says this wiki does not use that password =(
I'm going to go ahead and push out 0.2 of the python library this morning, and I'll do a 0.3 if there are convenience methods that should be added to the library to mirror the API itself.
> Other than the deprecation of relative_created_at, there's nothing in > the API changes that's going to negatively impact existing > applications. Everything that's been added lately is all convenience > methods. I still intend to put up official docs. I'll try to knock > those out today.
> -- > Alex
> On Mar 26, 2007, at 10:32 AM, DeWitt Clinton wrote:
> > Hi,
> > Is there any update regarding official documentation on the > > upcoming API changes? I'd like to push out version 0.2 of the > > python library, and the first release of a parallel Java library > > that I wrote, but I'm reluctant to do so until I know for sure what > > is changing in the API.
> > Since Alex mentioned that at the very least, relative_created_at is > > going away tomorrow (the 27th) this would presumably need to be > > done today.
> > Thanks!
> > -DeWitt
> > On 3/25/07, bear <bea...@gmail.com> wrote: > > I actually think the password on the page is wrong - I looked in the > > page history and see that someone has changed the first letter
> > Probably need to get Mr.Messina to look at that
> > On Mar 25, 9:33 pm, "Harakiro" < jle.edwa...@gmail.com> wrote: > > > I must be doing something wrong. I've registered with pbwiki.
> > > I try to join the wiki with twitter and sweety and it says it > > does not > > > exist.
> > > I try to edit the page and enter the password on the page sweety and > > > it says this wiki does not use that password =(
> I'm going to go ahead and push out 0.2 of the python library this morning, > and I'll do a 0.3 if there are convenience methods that should be added to > the library to mirror the API itself.
> > Other than the deprecation of relative_created_at, there's nothing in > > the API changes that's going to negatively impact existing > > applications. Everything that's been added lately is all convenience > > methods. I still intend to put up official docs. I'll try to knock > > those out today.
> > -- > > Alex
> > On Mar 26, 2007, at 10:32 AM, DeWitt Clinton wrote:
> > > Hi,
> > > Is there any update regarding official documentation on the > > > upcoming API changes? I'd like to push out version 0.2 of the > > > python library, and the first release of a parallel Java library > > > that I wrote, but I'm reluctant to do so until I know for sure what > > > is changing in the API.
> > > Since Alex mentioned that at the very least, relative_created_at is > > > going away tomorrow (the 27th) this would presumably need to be > > > done today.
> > > Thanks!
> > > -DeWitt
> > > On 3/25/07, bear <bea...@gmail.com> wrote: > > > I actually think the password on the page is wrong - I looked in the > > > page history and see that someone has changed the first letter
> > > Probably need to get Mr.Messina to look at that
> > > On Mar 25, 9:33 pm, "Harakiro" < jle.edwa...@gmail.com> wrote: > > > > I must be doing something wrong. I've registered with pbwiki.
> > > > I try to join the wiki with twitter and sweety and it says it > > > does not > > > > exist.
> > > > I try to edit the page and enter the password on the page sweety and > > > > it says this wiki does not use that password =(
One problem I'm having is that my relative date I have to compare it against (my system clock) isn't the same as the one used on the site. For example when I make an update at 9PM, it appears on the site as 8PM, so it's always an hour out.
This could be due to the fact that us in the UK have recently had our daylight saving, switching to GMT+1 now. Is there anyway for Twitter to know that we're now in BST (British Summer time) instead of GMT?
On Mar 21, 1:40 am, "Chris Messina" <chris.mess...@gmail.com> wrote:
> > On Mar 20, 7:41 pm, Rick Measham <r...@isite.net.au> wrote: > > > mike wrote: > > > > i hacked up this javascript "relative time" generator yesterday while > > > > putting together the tweetbar... it's based on the time distance code > > > > in Rails.
> > > > feel free to use it however you see fit:
> > > Thanks mike .. that's excellent.
> > > Below I've re-written the same logic in perl for those of us using perl.
> > and here it is in python :) -- the only thing I hacked in was to > > remove the +0000 from the string as I believe the time is returned to > > us as localtime. If it's not then switch localtime() with gmtime() > > below :)