Welcome, Guest
Please Login or Register.    Lost Password?

get AM or PM
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: get AM or PM
#15028
get AM or PM 3 Years, 3 Months ago  
I would like to know how to get the time value of am or pm in a script,

then, if "AM", show one graphic for the element,
and if "PM" show another graphic for an element.

Basically, one of the skins I am working on requires different imagery for AM/PM, and I have already managed to do the clock face, hours: and AM/PM indicator in one image of 24 frames ... using the time format %H

It is proving much more difficult with minutes. I can use a 60 frame image, but only one at a time, so I figure the script method would be better. This way I will have one image for AM minutes and one for PM minutes.
Rodger
Junior Boarder
Posts: 33
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Manyk Photography Location: Canada Birthday: 05/07
The administrator has disabled public write access.
 
#15033
Re: get AM or PM 3 Years, 3 Months ago  
The os.date function: www.lua.org/pil/22.1.html
os.date("%p") shows either "am" or "pm"

Is this an analog clock? If the answer is YES then check the analog clock from Chromophore skin for the minute hand rotation.

I don't know what you're doing, but 24 frames with AM/PM indicator??? If the images are a sequence of AM and PM only without any background change or text change, you will only need 2 images, one with AM and one with PM, and change the image element with Rainlendar_SetItemValue.
Jorge_Luis
Platinum Boarder
Posts: 785
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
The administrator has disabled public write access.
 
#15035
Re: get AM or PM 3 Years, 3 Months ago  
It's a digital clock. So 24 images for 24 hours, because the background of each image actually shows the hour, the : and the AM or PM. Also, over the 24 images, I can have it slightly change each hour. But this is for a certain skin.

I do actually want to have just two images for AM/PM in other skins. I was going to use a bitmap font with alphabet="0123456789:AP" , but even that is more work than what you just mentioned with setitemvalue ... THANK YOU!
Rodger
Junior Boarder
Posts: 33
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Manyk Photography Location: Canada Birthday: 05/07
The administrator has disabled public write access.
 
#15037
Re: get AM or PM 3 Years, 3 Months ago  
For a digital clock made with an alphabet, see this: jorgeluis-jorgeluis.deviantart.com/art/Digital-Clock-1-0-1-194033008
Jorge_Luis
Platinum Boarder
Posts: 785
graphgraph
User Offline Click here to see the profile of this user
Gender: Male My Rainlendar Skins Location: Argentina Birthday: 03/15
Last Edit: 2011/04/15 14:05 By Jorge_Luis.
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop