Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
Fri, 21. December 2007 - 09:09:25
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Please register with your real name and do not post any SPAM! Violations: "Hk." and "Getagrip" => deleted
1.459
Posts in
346
Topics by
21
Members
Latest Member:
Tim81
vLIB
English support
vlibTemplate, vlibMimeMail, vlibDate
HMS?
0 Members and 1 Guest are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: HMS? (Read 1302 times)
RNilsson
Guest
HMS?
on:
Sun, 09. February 2003 - 21:08:01
Will future versions of vlibDate include functions for handling hour, minute and seconds?
This to be able to make some finer adjustments and a more precise time for use with scripts (like news and post-scripts) etc and for storage in db.
Logged
releasedj
Guest
HMS?
Reply #1 on:
Mon, 10. February 2003 - 12:24:45
As far as I can see, no. To start messing with time, you have to get messy with things like daylight saving hours which is specific to a location, and I'm not prepared to get into that.
I think if we did, it might degrade the standard of the class, rendering it less useful than it presently is, in my opinion.
Regards,
Kelvin
Logged
RNilsson
Guest
HMS?
Reply #2 on:
Tue, 11. February 2003 - 01:17:57
Ok, then i know.
Tnx.
Logged
ClausVB
Administrator
Hero Member
Offline
Posts: 496
HMS?
Reply #3 on:
Mon, 21. April 2003 - 16:13:57
I used the following function to get date + HM (using vlibDate):
Code:
/////
// Rearranges date and time like strftime would do. Uses vlibDate.
// source 2002-06-17 111000 = german example Mon, 17. Jun 2002 - 1117
// @param
datetime � db_date --- c_open, c_accept, c_closed ... db_dates = DATETIME
// @return �string � � new_date --- Mon, 17. Jun 2002 - 1117
function format_datedb_date
{
global lang, display_date;
if issetdb_date
{
�if DEBUG echo br Error Date is not set;
�// new_date stays null for empty values in the database
}
else
{
�vlib_lang = substrlang, 0, 2;
�date = new vlibDatevlib_lang;
�old_date = explode , db_date;
�new_date = date-formatDateold_date0, display_date . substrold_date1, 0, 5;
}
return new_date;
/* what happens in this function
* �vlib_lang = substrlang, 0, 2; = vlib_lang = the first 2 chars of �
* �every lang variable english en, deutsch de, espanol es, etc.
* �old_date = explode|...|; = old_date0 = 2002-06-17; �old_date1 = 111000;
* �date-formatDateold_date0,|...|; = Mon, 17. Jun 2002 -
* �substrold_date1, 0, 5; = 1117
*/
}
I hope this will help you.
Regards,
Claus
Last Edit: Sun, 09. January 2005 - 20:17:45 by ClausVB
Logged
RNilsson
Guest
HMS?
Reply #4 on:
Thu, 01. May 2003 - 02:05:43
I already have some functions for handling date>dropBox conversion, and have used that code for time-manipulation.
I would have been nice to have it in vlibDate tho.
Logged
ClausVB
Administrator
Hero Member
Offline
Posts: 496
HMS?
Reply #5 on:
Sat, 12. February 2005 - 17:19:12
There is a quicker way than the function I found out:
Code:
tmpl-setvardate_time, date-formatDate
substrrowdate_time, 0, 10, �%a, %d.%m.%Y
. substrrowdate_time, 11, 8;
;
That should work, too.
Regards,
Claus
Last Edit: Sat, 12. February 2005 - 17:19:43 by ClausVB
Logged
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
English support
-----------------------------
=> vLIB examples
=> General questions
=> vlibTemplate, vlibMimeMail, vlibDate
-----------------------------
Deutscher Support
-----------------------------
=> Generelle Fragen
=> vlibTemplate, vlibMimeMail, vlibDate
Loading...