Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2004-10-30 14:24:54

nardo
Member
From: tuvalahiti
Registered: 2004-04-22
Posts: 743

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

you’re a prince among men and from Prague… good on ya, and cheers

Offline

#38 2005-10-04 09:36:14

skoggy
Member
From: Westcoast of Sweden
Registered: 2005-03-27
Posts: 209
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

This is a really fun and quite useful plugin. Thanx!

Offline

#39 2006-12-12 12:50:43

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

I’ve just discovered this plugin which looks like a close fit for my proposed travel blog. What I want to do is show how many days since we started our trip.

I notice that one of the updates allows for a “from” attribute; combined with the “posted” attribute, this appears to allow me to count the days between the start of the trip and the article being posted.

However, I’m struggling to get the “from” date format right. The forum posting says “The date/time format should adhere to the usual syntax”. Unfortunately, the link to examples is dead.

Can someone tell me the correct syntax for this attribute, or point me to another resource?

[EDIT] Just figured this out (clever me! not). However, is there any way to only output days. At the moment, my first article is showing “hours” when really I want it to show as “Day 1”.

Thanks, AS

Last edited by aslsw66 (2006-12-12 12:52:22)

Offline

#40 2006-12-12 12:54:24

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

See strftime specs, also you can search for ‘strftime’ on the php.net site.


Who’s gonna textdrive you home tonight?

Offline

#41 2006-12-12 12:58:49

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Mamesh,

Wow! It’s nearly midnight here so I really wasn’t expecting a response so soon.

I edited my initial post, but here’s the gist… Is there any way to get this to just output the number of days? I want to calculate the number of days since the trip started. If the first article is about the first day of the trip, I really want this to output “Day 1”.

Great plugin. I can’t believe how often I think about an idea, search the forums and someone else has already done it!

AS

Offline

#42 2006-12-12 13:10:35

mamash
Member
From: Prague
Registered: 2004-02-21
Posts: 127
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Two years after I’ve made the thing and you’re expecting me to remember? :)

I don’t think this actually happened ever. And the situation with my time available is even worse now, so if anybody wants to grab this, feel free to do so and make it better.


Who’s gonna textdrive you home tonight?

Offline

#43 2006-12-12 20:51:23

aslsw66
Member
From: Canberra, Australia
Registered: 2004-08-04
Posts: 342
Website

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Fair ‘nuff! I can sympathise with the time pressures…

Well, I’m more a hacker than a programmer. I’m going to have a go at hacking something together for my own needs – but your code is a great headstart for me so many many thanks for that.

Offline

#44 2008-02-27 07:09:28

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Have I been using this plugin for so long? Today is neme.org’s 3rd birthday and there seems to be a problem with the way the plugin calculates time as it is showing our time online as “2 years, 11 months and 24 days”. As Mamash gave up this plugin, is anybody interested in taking it over?


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#45 2008-02-27 20:31:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

It’s still working fine on my site. The only thing is it uses the server time, which in my case is 6 hours behind my local time. But 7 days off? Is your server on another planet maybe ;)

Offline

#46 2008-02-28 06:41:37

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,011
Website GitHub Mastodon Twitter

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Els wrote:

It’s still working fine on my site. The only thing is it uses the server time, which in my case is 6 hours behind my local time. But 7 days off? Is your server on another planet maybe ;)

It is very strange. I have 2 txp installs in textdrive/joyent under the same domain. One of them showed the time difference just fine but not the other. This morning, all is ok… What is Mary’s usual diagnosis?… Gremlins?

Last edited by colak (2008-02-28 07:16:15)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#47 2008-02-29 00:36:54

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] fha_time_diff: A Time Since generator

Could it have been the browser cache?

Offline

Board footer

Powered by FluxBB