Can I have Tasker on 12hr clock?

447 views
Skip to first unread message

Glenn Elliott

unread,
Aug 21, 2012, 10:37:16 PM8/21/12
to tas...@googlegroups.com
I hate military time! lol Any help? 
Message has been deleted

Glen

unread,
Aug 21, 2012, 10:47:06 PM8/21/12
to tas...@googlegroups.com
What do you want to do?

Glenn Elliott

unread,
Aug 21, 2012, 10:50:03 PM8/21/12
to tas...@googlegroups.com
well like when setting up timed events, it's on military time,  I would like it on 12hr time... 

Keith

unread,
Aug 21, 2012, 11:01:47 PM8/21/12
to tas...@googlegroups.com
I wrote this task to format time.  Par1 is the time, Par 2 is [civ|mil],[delimiter].  So to get civilian time, call with Par2 = civ,:

It defaults to civilian time.  For some reason I decided not to default the delimiter... don't remember why, but there WAS a reason :).  BTW, I just made  a bug fix to this since 12:15pm was showing up as 12:15am, but can't test it until after noon tomorrow.  Other than that this is pretty solid.

Hmmm... I was just looking this over again and all it really does is convert military time to civilian (which is what you were looking for) but it won't convert civilian to military.  You could just get rid of Par2 and make this a little simpler.

Util: Format Time (18)
Run Both Together
A1: Variable Set [ Name:%type To:civ Do Maths:Off Append:Off ] 
A2: Variable Set [ Name:%time_in To:%par1 Do Maths:Off Append:Off ] 
A3: If [ %par2 Is Set ]
A4:    Variable Set [ Name:%params To:%par2 Do Maths:Off Append:Off ] 
A5:    Variable Split [ Name:%params Splitter:, Delete Base:Off ] 
A6:    Variable Set [ Name:%type To:%params1 Do Maths:Off Append:Off ] If [ %params1 Is Set ]
A7:    Variable Set [ Name:%delimiter To:%params2 Do Maths:Off Append:Off ] If [ %params2 Is Set ]
A8: End If 
A9: Variable Split [ Name:%time_in Splitter:. Delete Base:Off ] 
A10: Variable Set [ Name:%hour To:%time_in1 Do Maths:Off Append:Off ] 
A11: Variable Set [ Name:%minutes To:%time_in2 Do Maths:Off Append:Off ] 
A12: If [ %type ~ civ ]
A13:   If [ %hour > 11 ]
A14:       Variable Set [ Name:%hour To:%hour-12 Do Maths:On Append:Off ] If [ %hour > 12 ]
A15:       Variable Set [ Name:%suffix To:pm Do Maths:Off Append:Off ] 
A16:    Else 
A17:       Variable Set [ Name:%hour To:12 Do Maths:Off Append:Off ] If [ %hour = 0 ]
A18:       Variable Set [ Name:%suffix To:am Do Maths:Off Append:Off ] 
A19:     End If 
A20: End If 
A21: Variable Set [ Name:%return To:%hour%delimiter%minutes Do Maths:Off Append:Off ] If [ %delimiter Is Set ]
A22: Variable Set [ Name:%return To:%hour%minutes Do Maths:Off Append:Off ] If [ %delimiter ! Set ]
A23: Variable Set [ Name:%return To:%suffix Do Maths:Off Append:On ] If [ %suffix Is Set ]
A24: Return [ Value:%return Stop:On ] 

Keith

Keith

unread,
Aug 21, 2012, 11:05:01 PM8/21/12
to tas...@googlegroups.com
Oops, our posts crossed.  I can help you format time, but I doubt there is any way to change the internal workings of Tasker regarding timed events, etc.  Nor am I sure that you would really want to.  I could foresee a lot of posts out here "I have this event for a specific time and it fires twice a day instead of once" :).

Glenn Elliott

unread,
Aug 21, 2012, 11:12:41 PM8/21/12
to tas...@googlegroups.com
not if PM and AM are added! lol 




On Tuesday, August 21, 2012 9:37:16 PM UTC-5, Glenn Elliott wrote:
Reply all
Reply to author
Forward
0 new messages