Author Topic: Break Duration  (Read 4856 times)

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Break Duration
« on: October 30, 2012, 11:24:04 AM »
Hi Corey, any chance I can get a token for the display for <nextBreakDuration> ie the length of the next break?

so that I can display:
Next Break : <nextBreakDuration>, End of Level <roundBeforeBreak>

Regards
Stuart
« Last Edit: October 30, 2012, 11:27:59 AM by Stuart Murray »
Stuart Murray

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Break Duration
« Reply #1 on: October 30, 2012, 05:06:27 PM »
Already there: <duration break="+1">

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #2 on: October 31, 2012, 08:26:14 AM »
Nice one cheers!
Stuart Murray

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #3 on: October 31, 2012, 08:33:45 AM »
Just been playing around with it, is there anyway I can change it so it displays thus:

Next Break : 15m, End of Level 3


I am currently using : <nobr> Next Break : <nobr> <duration break="+1" format="HM">, End of Level <roundbeforenextbreak>
Which displays as:
Next Break : 00:15, End of Level 3

i.e. can I just display 15m instead of 00:15, in the same manner as <nextbreak format="HM" showSeconds="false"> works?

Regards
Stu
Stuart Murray

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #4 on: October 31, 2012, 08:43:48 AM »
And another question, on the same situation, is there any way of specifying conditions for no breaks defined/no further breaks so I can turn the break info transparent, instead of it displaying:

Next Break : None, End of Level None

Cheers
Stu
Stuart Murray

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Break Duration
« Reply #5 on: October 31, 2012, 11:39:40 AM »
Just been playing around with it, is there anyway I can change it so it displays thus:

Next Break : 15m, End of Level 3


I am currently using : <nobr> Next Break : <nobr> <duration break="+1" format="HM">, End of Level <roundbeforenextbreak>
Which displays as:
Next Break : 00:15, End of Level 3

i.e. can I just display 15m instead of 00:15, in the same manner as <nextbreak format="HM" showSeconds="false"> works?

Regards
Stu

Not sure why yours displays this way.  Mine displays as "15m", because the <duration> token does accept the format attribute.  What version are you using?

And another question, on the same situation, is there any way of specifying conditions for no breaks defined/no further breaks so I can turn the break info transparent, instead of it displaying:

Next Break : None, End of Level None

Cheers
Stu

Not currently, because there's no variable to let you know whether or not there are more breaks (or rounds) scheduled.  I'll add them for 3.2.

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #6 on: October 31, 2012, 12:44:00 PM »
Currently using version 3.1.1

I posted slightly conflicting information as I am currently using:
<nobr> <duration break="+1" format="HM">, End of Level <roundbeforenextbreak>

which displays as below

Stuart Murray

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Break Duration
« Reply #7 on: November 01, 2012, 06:47:23 AM »
OK, so the format="HM" part does work for you.  But I'll still have to add some variables to be able to catch when there are no more breaks and hide the information.

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #8 on: November 01, 2012, 08:40:41 AM »
format="HM" does work but displays as 0h 15m, I note in your previous post it works for you just displaying 15m, you any idea how I can get rid of the "0h" part?

Variables will be most helpful when there are no more breaks, as I can create a conditions set that turns the two cells transparent when the conditions of no more breaks or no breaks are defined.

Cheers
Stu
Stuart Murray

T-Bone

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Break Duration
« Reply #9 on: November 02, 2012, 04:09:53 AM »
Mine also displays like Stu's...0h 15m.
If it ain't naked, deep-fried or poker-related, I ain't interested!

Corey Cooper

  • Administrator
  • Hero Member
  • *****
  • Posts: 6216
    • View Profile
Re: Break Duration
« Reply #10 on: November 02, 2012, 01:48:22 PM »
format="HM" does work but displays as 0h 15m, I note in your previous post it works for you just displaying 15m, you any idea how I can get rid of the "0h" part?

Not until 3.2.  I've got a to-do item to enhance HM to be HMS and recognize upper- versus lower-case.  Upper means always display, lower means display only if non-zero.  (And missing means don't display at all, so "HM" would mean always display hours and minutes, but never seconds, whereas "hmS" would mean always display seconds, and only display minutes if non-zero, and only display hours if non-zero).

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #11 on: November 02, 2012, 02:13:24 PM »
Excellent update, look forward to it

Cheers
Stu
Stuart Murray

The Meal

  • Jr. Member
  • **
  • Posts: 52
    • View Profile
Re: Break Duration
« Reply #12 on: November 03, 2012, 12:47:47 PM »
format="HM" does work but displays as 0h 15m, I note in your previous post it works for you just displaying 15m, you any idea how I can get rid of the "0h" part?

Not until 3.2.  I've got a to-do item to enhance HM to be HMS and recognize upper- versus lower-case.  Upper means always display, lower means display only if non-zero.  (And missing means don't display at all, so "HM" would mean always display hours and minutes, but never seconds, whereas "hmS" would mean always display seconds, and only display minutes if non-zero, and only display hours if non-zero).

Fantastic!  The extra work to do it this way will be utilized by me.

Stuart Murray

  • Hero Member
  • *****
  • Posts: 540
    • View Profile
Re: Break Duration
« Reply #13 on: January 19, 2013, 08:57:51 AM »
any update on this matter Corey? I am currently using 3.2b2 with this:

<nobr> <duration break="+1" format="hm">, END L<roundbeforenextbreak>

which displays as

0h 15m, END L3

I would presume therefore that you didn't get the upper v lower case definition created in 3.2 or do I need to use it as an expression instead?  even if I could have "mm" instead as an option that would sort that out and did you get the job done.

Also any progress on the variables to catch if there are no more breaks defined?

Cheers
Stu
Stuart Murray

T-Bone

  • Full Member
  • ***
  • Posts: 173
    • View Profile
Re: Break Duration
« Reply #14 on: January 21, 2013, 09:47:30 AM »
Stu:

I'm pretty sure it doesn't work in 3.2b2. At least I can't make it do my bidding!
If it ain't naked, deep-fried or poker-related, I ain't interested!