[Q] Show start/end days on calendar - Zooper Widget General

I have a sort of agenda made in Zooper of my upcoming calendar appointments, but some events last more than a day (weekend away etc). How can I make this show a start and end date, instead of just the start? At the moment I have, for example:
Saturday 23 November - buy sausages - 11.00
Friday 29 November - weekend away - all day
Wednesday 4 December - do a big poo - all day
How could I make it say:
Saturday 23 November - buy sausages - 11.00
Fri 29 Nov - Sun 1 Dec - weekend away - all day
Wednesday 4 December - do a big poo - all day
Is this even possible? To normally show the date, but if the apoointment lasts more than a day make it show the start and end date? I'm trying to learn it but programming isn't my strong point! Thanks for any help.

edithswanneck said:
I have a sort of agenda made in Zooper of my upcoming calendar appointments, but some events last more than a day (weekend away etc). How can I make this show a start and end date, instead of just the start? At the moment I have, for example:
Saturday 23 November - buy sausages - 11.00
Friday 29 November - weekend away - all day
Wednesday 4 December - do a big poo - all day
How could I make it say:
Saturday 23 November - buy sausages - 11.00
Fri 29 Nov - Sun 1 Dec - weekend away - all day
Wednesday 4 December - do a big poo - all day
Is this even possible? To normally show the date, but if the apoointment lasts more than a day make it show the start and end date? I'm trying to learn it but programming isn't my strong point! Thanks for any help.
Click to expand...
Click to collapse
Zooper has two date tags per calendar event #C0S...# for the start date and #C0E...# for the end date. What you have to do is compare if the day/month combo of the start is equal to that of the end date and then show different strings based on that. In Zooper conditionals, this should look like this:
Code:
$#C0SddMM# = #C0EddMM#?<your same day string here>:<your different day string here>$
Hope this helps you out

Hi, thanks for that, but I'm afraid I'm totally lost still. I have this at the moment. So I'd change the first part (C0SEEEE dd MMMM, C1SEEEE etc) to what you said, but what exactly am I putting in the same/different day string bit?
Code:
[b]#C0SEEEE dd MMMM#[/b] - #C0TITLE# - $#C0D#=1?All Day:#C0SHH.mm#$
[b]#C1SEEEE dd MMMM#[/b] - #C1TITLE# - $#C1D#=1?All Day:#C1SHH.mm#$
[b]#C2SEEEE dd MMMM#[/b] - #C2TITLE# - $#C2D#=1?All Day:#C2SHH.mm#$
I'm away for a couple of days so if I don't reply soon I'm not being rude. Thanks again.

edithswanneck said:
Hi, thanks for that, but I'm afraid I'm totally lost still. I have this at the moment. So I'd change the first part (C0SEEEE dd MMMM, C1SEEEE etc) to what you said, but what exactly am I putting in the same/different day string bit?
Code:
[b]#C0SEEEE dd MMMM#[/b] - #C0TITLE# - $#C0D#=1?All Day:#C0SHH.mm#$
[b]#C1SEEEE dd MMMM#[/b] - #C1TITLE# - $#C1D#=1?All Day:#C1SHH.mm#$
[b]#C2SEEEE dd MMMM#[/b] - #C2TITLE# - $#C2D#=1?All Day:#C2SHH.mm#$
I'm away for a couple of days so if I don't reply soon I'm not being rude. Thanks again.
Click to expand...
Click to collapse
Here is my solution for the first day. Didn't test it in Zooper though.
HTML:
[b]$#C0SddMM# = #C0EddMM#?#C0SEEEE dd MMMM#:#C0SEEE dd MMM# - #C0EEEE dd MMM#$[/b] - #C0TITLE# - $#C0D#=1?All Day:#C0SHH.mm#$

Perfect, thanks very much!
And then a new problem arrives! The 1-day (all day) events are shown as a 2-day event, as here http://forum.xda-developers.com/showthread.php?t=2522974 I can't find the other thread he started, I'm guessing there's no workaround for that yet then if it's a Google matter?

Related

[Q] Monthly Calendar

I'm trying to make my own monthly Calendar in Zooper, but i have a big problem. When i say, in advanced parameters, to calculate the day of the week with this string: #D$(#DyMM#010000)$f# i obtain 0 if it's sunday, 1 if it's monday and so on. The problem is that i need to obtain 7 if it's sunday, becaus in italian format week start on monday and finish on sunday.
I can't check it in this way: $#D$(#DyMM#010000)$f#=0?7$ because zooper doesn't recognize nested $...
I think the only way is to change the $(expression)$ for math expressions using another char (maybe § or similar).
Any suggest?
N3V3RM1ND said:
I'm trying to make my own monthly Calendar in Zooper, but i have a big problem. When i say, in advanced parameters, to calculate the day of the week with this string: #D$(#DyMM#010000)$f# i obtain 0 if it's sunday, 1 if it's monday and so on. The problem is that i need to obtain 7 if it's sunday, becaus in italian format week start on monday and finish on sunday.
I can't check it in this way: $#D$(#DyMM#010000)$f#=0?7$ because zooper doesn't recognize nested $...
I think the only way is to change the $(expression)$ for math expressions using another char (maybe § or similar).
Any suggest?
Click to expand...
Click to collapse
Is your system locale set to italian or are you using it another language (like english for example)? If the later, did you try setting the widget locale to italian?
kwerdenker said:
Is your system locale set to italian or are you using it another language (like english for example)? If the later, did you try setting the widget locale to italian?
Click to expand...
Click to collapse
It's italian.
N3V3RM1ND said:
It's italian.
Click to expand...
Click to collapse
Then it's probably a bug with Zooper. You should get in touch with the developer to clear it up.
kwerdenker said:
Then it's probably a bug with Zooper. You should get in touch with the developer to clear it up.
Click to expand...
Click to collapse
I'll wait for Richard's reply, if anyone have suggestions...
kwerdenker said:
Is your system locale set to italian or are you using it another language (like english for example)? If the later, did you try setting the widget locale to italian?
Click to expand...
Click to collapse
Hey can you provide full tutorial for make monthly calendar in zooper? Thanx:good:
N3V3RM1ND said:
I'm trying to make my own monthly Calendar in Zooper, but i have a big problem. When i say, in advanced parameters, to calculate the day of the week with this string: #D$(#DyMM#010000)$f# i obtain 0 if it's sunday, 1 if it's monday and so on. The problem is that i need to obtain 7 if it's sunday, becaus in italian format week start on monday and finish on sunday.
I can't check it in this way: $#D$(#DyMM#010000)$f#=0?7$ because zooper doesn't recognize nested $...
I think the only way is to change the $(expression)$ for math expressions using another char (maybe § or similar).
Any suggest?
Click to expand...
Click to collapse
Sorry; but I don't understand where is the problem...
(I'm Italian)
Why is it important for you have 7 on sunday instead 0?
Could you explain why for you this is important?
HyperAbarth said:
Sorry; but I don't understand where is the problem...
(I'm Italian)
Why is it important for you have 7 on sunday instead 0?
Could you explain why for you this is important?
Click to expand...
Click to collapse
Because the whole calendar is out of layout. I have the 7th day after saturday... i can't do a screenshot now, 'cause i removed the widget... if you nedd one i can reinstall it.
I'm having the same problem. Using the code [ox]44*#D$(#DyMM#050000)$f#-30[/ox]
[oy]22*#D$(#DyMM#050000)$W#[/oy]
Zooper automatically put the number in the correct position in a grid, but this cause many problem with Sunday.
I was wondering if there's a way to change 0 to 7 using advanced code, but no success til now...
Inviato dal mio Nexus 5 utilizzando Tapatalk
Please make a tutorial video
Sent from my SPH-L710 using xda app-developers app
I added days to shift Sundays to end and used % operator to move the remaining days. Now Sundays have to be moved to previous week as well, which required a different technique to compute y offset. Lastly hide 29, 30, 31st if they aren't valid for current month.
Example for day 31 is
[ox]12+23* ((#D$(#DyMM#310000)$f# +5)%7)[/ox]
[oy]2+19*(floor( (#D$(#DyMM#010000)$f#-3+31)/7)+1)[/oy]
[c]$#Dl#<31?#00000000$[/c]
Complete widget is also attached.
Thanks button click?
For those who want to understand code:
12 is x margin, 23 is column width, every day is shifted by 5 so Sunday(1) becomes 6 and week days range between 0 and 6
2 is y margin, 19 is row height, add the day number(31) to the location of 1st day of month and divide by 7 to get week number. floor to discard fraction part. 3 is subtracted to cater for certain changes like 1-7 range change to 0-6 range, Sunday shift etc. first week is 0, 1 is added to all weeks to have week range 1-5 , instead of 0-4
Yesterday I downloaded the template and "installed" on my Smartphone (just for test) but I had a problem.
In your attached image I see a correct Montly Calendar but if I create a Widget using your Template I obtain a Montly Calendar but there is a problem:
(unfortunately I can't post one image because I've already deleted widget and template from my smartphone)
I've same header (Mo, tu, we, etc)
But all the days of the month are "shifted" !?!?! for example 18th isn't under "Sa" Column but is under "Fr" Column ... 19th isn't under "Su" Column but is under "Sa" Column ... etc.
The same error for all days.
I didn't have investigated about the reason of this mistake because I don't need this Widget; I've made only a test ...
HyperAbarth said:
Yesterday I downloaded the template and "installed" on my Smartphone (just for test) but I had a problem.
In your attached image I see a correct Montly Calendar but if I create a Widget using your Template I obtain a Montly Calendar but there is a problem:
(unfortunately I can't post one image because I've already deleted widget and template from my smartphone)
I've same header (Mo, tu, we, etc)
But all the days of the month are "shifted" !?!?! for example 18th isn't under "Sa" Column but is under "Fr" Column ... 19th isn't under "Su" Column but is under "Sa" Column ... etc.
The same error for all days.
I didn't have investigated about the reason of this mistake because I don't need this Widget; I've made only a test ...
Click to expand...
Click to collapse
That is a know bug. It's because the "day of the week (number)" tag #Df# produces different numbers based on the locale of the device it's used on. Sometimes Sunday is 0, sometimes it's 7 for example.
The developer is aware of it but has not yet provided a solution.
On my Smartphone #Df# for Sunday return 0 (in some widget I make tests on 0 or 6 to color Saturday and Sunday).
You speak about " the locale of the device" to set 0 or 7; where can I set this "locale"?
I'm Italian and I set Language, time, date format, etc. for Italy ... but in Zooper Sunday is 0.
HyperAbarth said:
On my Smartphone #Df# for Sunday return 0 (in some widget I make tests on 0 or 6 to color Saturday and Sunday).
You speak about " the locale of the device" to set 0 or 7; where can I set this "locale"?
I'm Italian and I set Language, time, date format, etc. for Italy ... but in Zooper Sunday is 0.
Click to expand...
Click to collapse
Locale is the language option set for the device. I have mine set to English (US) and for me sunday is 1. If I set it to German it's 0. So maybe I got the 7 wrong and it was 0 and 1 but I'm sure I also read something about a 7... I have to check up on that.
Either way: there is no constant way of determining the value of #Df# and that is why calendar templates based on this method are screwed up on some devices.
Know if upcoming updates will correct this bug?
Enviado desde mi LG-P700 mediante Tapatalk
joseelche said:
Know if upcoming updates will correct this bug?
Enviado desde mi LG-P700 mediante Tapatalk
Click to expand...
Click to collapse
No, the developer has not yet announced anything specific about this.
It also has to be said that this isn't a bug strictly speaking. Different cultures have different ideas when a week "starts". In europe it's mainly on monday while in north america sunday is the first day of a new week. So the different output of #Df# is actually correct. It just produced unexpected behavior when used for something like this monthly calendar.
Normal Calender
qaiser said:
I added days to shift Sundays to end and used % operator to move the remaining days. Now Sundays have to be moved to previous week as well, which required a different technique to compute y offset. Lastly hide 29, 30, 31st if they aren't valid for current month.
Example for day 31 is
[ox]12+23* ((#D$(#DyMM#310000)$f# +5)%7)[/ox]
[oy]2+19*(floor( (#D$(#DyMM#010000)$f#-3+31)/7)+1)[/oy]
[c]$#Dl#<31?#00000000$[/c]
Complete widget is also attached.
Thanks button click?
For those who want to understand code:
12 is x margin, 23 is column width, every day is shifted by 5 so Sunday(1) becomes 6 and week days range between 0 and 6
2 is y margin, 19 is row height, add the day number(31) to the location of 1st day of month and divide by 7 to get week number. floor to discard fraction part. 3 is subtracted to cater for certain changes like 1-7 range change to 0-6 range, Sunday shift etc. first week is 0, 1 is added to all weeks to have week range 1-5 , instead of 0-4
Click to expand...
Click to collapse
Alright so you got the calender to work for Monday throught Sunday, How would the advanced parameters look for a calender Sunday throught Saturday. I can't seem to adjust your calender to work that way. I also could not figure out the X and Y margins. Nothing shifted correctly everytime I tried to change the X and Y for a larger widget. Thanks
Can yor macke .zw fail pls.
I've imported this widget, but there's a problem: in months where the first (of jan, of feb,of mar...) is on Sunday = the last day in week, it is shown in the same row with day names (you can see it in SS).
Does anybody know how to solve it?

[Q] show calendar events between midnight and 6am on previous day

I'm using a fairly simply rich text setup to show my calendar events, such as
[sr=0.8]#C0SEEE# [no]#C0Sdd#[/no] #C0Sh#[tl]#C0Sa# • [/tl][/sr]#C0TITLE#
Which looks something like
TUE 3RD 3AM • GIANTS @ PADRES
However, it drives me mad when events begin between 12 and 6am they are listed as the next day (which is actually correct, but I'm in a different time zone and cannot change the time zone of the Icalendar I am using).
Is there a fairly simple way to use conditionals that say if C0dd is between 12 am and 6am then display C0SEE as the previous day, so the above example would become
MON 2ND 3AM • GIANTS @ PADRES
then I can clearly see the game is late Monday night and not early Tuesday morning. The time and the event name would not change.
strewth78 said:
I'm using a fairly simply rich text setup to show my calendar events, such as
[sr=0.8]#C0SEEE# [no]#C0Sdd#[/no] #C0Sh#[tl]#C0Sa# • [/tl][/sr]#C0TITLE#
Which looks something like
TUE 3RD 3AM • GIANTS @ PADRES
However, it drives me mad when events begin between 12 and 6am they are listed as the next day (which is actually correct, but I'm in a different time zone and cannot change the time zone of the Icalendar I am using).
Is there a fairly simple way to use conditionals that say if C0dd is between 12 am and 6am then display C0SEE as the previous day, so the above example would become
MON 2ND 3AM • GIANTS @ PADRES
then I can clearly see the game is late Monday night and not early Tuesday morning. The time and the event name would not change.
Click to expand...
Click to collapse
This should display the date and day of any event that starts before 6 am as the prior day and date:
Code:
[sr=0.8]$#C0SH#<6?#C0S-1440EEE# [no]#C0S-1440dd#[/no]:#C0SEEE# [no]#C0Sdd#[/no]$ #C0Sh#[tl]#C0Sa# • [/tl][/sr]#C0TITLE#
Thanks... you've absolutely made my evening!
Had spent so long designing my widget, I was gutted when I realised the calendars time zone couldn't be switched
Prob K email solved. Thanks again.

[Q] All day events

Hello, anybody knows how to add all day events instead time 00:00 in this sentence?:
#C0SEEE# [tr=24]#C0TITLE#[/tr] - #C0SP:mm#-#C0EHH:mm# $#C0SDD#=#DD#?Today$$#C0SDD#=(#DD#+1)?Tomorrow$$#C0SDD#>(#DD#+1)?#C0SMMM d#$
#C1SEEE# [tr=24]#C1TITLE#[/tr] - #C1SP:mm#-#C1EHH:mm# $#C1SDD#=#DD#? Today$$#C1SDD#=(#DD#+1)? Tomorrow$$#C1SDD#>(#DD#+1)?#C1SMMM d#$
#C2SEEE# [tr=24]#C2TITLE#[/tr] - #C2SP:mm#-#C2EHH:mm# $#C2SDD#=#DD#? Today$$#C2SDD#=(#DD#+1)? Tomorrow$$#C2SDD#>(#DD#+1)?#C2SMMM d#$
obiwan77 said:
Hello, anybody knows how to add all day events instead time 00:00 in this sentence?:
#C0SEEE# [tr=24]#C0TITLE#[/tr] - #C0SP:mm#-#C0EHH:mm# $#C0SDD#=#DD#?Today$$#C0SDD#=(#DD#+1)?Tomorrow$$#C0SDD#>(#DD#+1)?#C0SMMM d#$
#C1SEEE# [tr=24]#C1TITLE#[/tr] - #C1SP:mm#-#C1EHH:mm# $#C1SDD#=#DD#? Today$$#C1SDD#=(#DD#+1)? Tomorrow$$#C1SDD#>(#DD#+1)?#C1SMMM d#$
#C2SEEE# [tr=24]#C2TITLE#[/tr] - #C2SP:mm#-#C2EHH:mm# $#C2SDD#=#DD#? Today$$#C2SDD#=(#DD#+1)? Tomorrow$$#C2SDD#>(#DD#+1)?#C2SMMM d#$
Click to expand...
Click to collapse
If you don't want the time for all day events to be displayed use something like this:
$#C0D#=0?#C0SP#\:#C0Smm#-#C0EHH#\:#C0Emm#:all day$
This will display "all day" instead of the time for all day events.
By the way, using (#DD#+1) to test if a calendar event is tomorrow or latter could cause problems at the end of the year. For example, if today is December 31, 2015, then (#DD#+1) will equal 366 which means those two conditionals you're using will never be true.
Thank you. But how to add this string rightly in my phrase ?.
[Edit]
Ok, i got it.

Help... total newbie question...

All I need to know is in Zooper... can I display an image instead of the text displaying the day of the week... so for example... if I want to display a draw of a camel on Wednesday instead of the text 'Wednesday' or 'Wed' etc. can I do do this? I am sure it is possible... I just cannot figure out HOW Thanks for any help!
As you can tell from the below sample you can see that you should me able to write an expression that would allow you to not only change the date and time but to do exactly what you want. If you need any help please pm me and I'll help you out any way I can.
Cheers!
If I've been of help please hit the thanks button.
I$#BLEVN#>10?Good!:Look for a charger!$ will render “Good!” if battery level is greater than 10 or “Look for a charger!” otherwise
Rich Text [c=$#BLEVN# 10 && #BLEVN < 25 ? #FFFF00$$#BLEVN# >= 25 ? #00FF00$]#BLEVN#%[/c] will write battery level (es 10%) in RED if battery is 1) ? #C0EEEE$ will write first calendar entry day name writing “Today” if its today, “Tomorrow” if tomorrow, the name of the day otherwise
$#C0SHH:mm#!=00:00$ will render the starting HH:mm of first calendar event only if it is different than “00:00″
Is it August $#DM#=8?Yes:No$ will render “Is it August: Yes” during August, “Is it August: No” otherwise
$#LCN#!=Germany$ will render the Country name only if its not Germany (nothing otherwise)
$#C0D#=1?#C0Shh\:mm#$ will show the time of first calendar event start in 12 h format only if the entry is not an all day event (please remember to*escape*the “:” into “\:” otherwise it will be considered an “else” block!)
KiRyah said:
As you can tell from the below sample you can see that you should me able to write an expression that would allow you to not only change the date and time but to do exactly what you want. If you need any help please pm me and I'll help you out any way I can.
Cheers!
If I've been of help please hit the thanks button.
I$#BLEVN#>10?Good!:Look for a charger!$ will render “Good!” if battery level is greater than 10 or “Look for a charger!” otherwise
Rich Text [c=$#BLEVN# 10 && #BLEVN < 25 ? #FFFF00$$#BLEVN# >= 25 ? #00FF00$]#BLEVN#%[/c] will write battery level (es 10%) in RED if battery is 1) ? #C0EEEE$ will write first calendar entry day name writing “Today” if its today, “Tomorrow” if tomorrow, the name of the day otherwise
$#C0SHH:mm#!=00:00$ will render the starting HH:mm of first calendar event only if it is different than “00:00″
Is it August $#DM#=8?Yes:No$ will render “Is it August: Yes” during August, “Is it August: No” otherwise
$#LCN#!=Germany$ will render the Country name only if its not Germany (nothing otherwise)
$#C0D#=1?#C0Shh\:mm#$ will show the time of first calendar event start in 12 h format only if the entry is not an all day event (please remember to*escape*the “:” into “\:” otherwise it will be considered an “else” block!)
Click to expand...
Click to collapse
Hi! I saw this post of yours, I know it is late but I am trying to edit my calendar widget so that it displays the event in this format: *Month* *Day* *Day of the Week* *Time (if not an all day event)* *Event Title*
For example my first upcoming event is: Suits Season 5 Return @ January 27 at 6PM.
So the only way I could tweak it as closely to my preference displays as "Wed Jan 27 6:00PM Suits Season 5 Return". This is REALLY close to how I am trying to get it but the rich text is a bit complicated for me.
As of right now my current rich text is: #C0SEEE MMM d hh:mma# #C0TITLE#
I am trying to have it say, "Jan 27 - Wed - 6:00PM Suits Season 5 Return" AS well as for the time to disappear if it were an all day event instead. Do you think you can help me out with this? I tried to copy and paste in some of your code it wasn't really working for me.

Code for showing date of next events

I recently downloaded a pack for my Zooper Pro Widget which is supposed to show the weather and the next three events. All was going well until I realised all events were, seemingly, on a Monday. I went to set the date to, using today as an example, 05/08/15 (or similar), and thought I had it. However, all events are now seemingly happening on Mon 05/08, which definitely isn't right!
Can anybody help me set the current format to "Day of Week, Short Date, Event Name"?
The current code and how they show up for the three shown events are as follows.
i) Mon 5/8 - Book injection for 07/09/15
"[ b ]#C0SEEE # #Dd #/#DM #[/b ] - #C0TITLE#"
What I want: Mon 10/08 - Book injection for 07/09/15
I've put spaces in the code just so it doesn't go bold, etc. on here.
The next two are roughly the same but with different event names and the 0s replaced with 1s and 2s.
Any help guys?
Thanks
David.273 said:
i) Mon 5/8 - Book injection for 07/09/15
"[ b ]#C0SEEE # #Dd #/#DM #[/b ] - #C0TITLE#"
What I want: Mon 10/08 - Book injection for 07/09/15
Click to expand...
Click to collapse
Use: #C0SE dd/MM# - #C0TITLE#
What's happening with your code is its getting the event 0 day (#C0SEEE#), then today's date and month (#Dd# and #DM#). To get event 0's date and month (and whatever else) you apply the date codes to the #C0S...# code. So #C0Sdd# and #C0SMM# would work, but it is easier to combine them.

Categories

Resources