Week numbers script
so i found this script to add week numbers, now i cant remove them on iCal
--Copy below this line into Script Editor and click run --
--Annual Week numbers
--John Maisey
--4/2/5
--Modified for Leopard
--3/3/8
set numberOfWeeks to 52 -- change as needed
set daysText to "MonTueWedThuFriSatSun"
set aDate to (current date)
set day of aDate to 1
set month of aDate to January
set aDay to weekday of aDate
set weekNo to 1
--Day of week as num. starting with 0
set aDayText to (characters 1 thru 3 of (aDay as text)) as text
set dayOff to ((offset of aDayText in daysText) - 1) / 3 as integer
if dayOff is less than 5 then
set StartDate to aDate - dayOff * days
else
set StartDate to aDate + (7 - dayOff) * days
end if
tell application "iCal"
set newCal to make new calendar at end of calendars with properties {title:"Week No."}
set myCal to (count of every calendar)
end tell
repeat with myCount from 1 to numberOfWeeks
if (month of StartDate is December) and (day of StartDate is greater than 28) then set weekNo to 1
if (month of StartDate is January) and (day of StartDate is less than 5) then set weekNo to 1
set weekText to "Week No. " & weekNo
tell application "iCal"
tell calendar myCal
make new event at end of events with properties {start date:StartDate, end date:StartDate + (7 * days), allday event:true, summary:weekText}
end tell
end tell
set weekNo to weekNo + 1
set StartDate to StartDate + 7 * days
end repeat
any ideas on how to remove them?
Control-click the 'Week no' calendar and choose 'Delete'.
Similar Messages
-
Calendar week numbers in Yosemite do not show entirely in Year View
Sorry to say this but I'm actually a bit shocked at Apple's quality control to be posting this bug. Bugs are one thing but this is, in my view, absolutely unacceptable.
Calendar Week Numbers are truncated in the Year View. Only the first digit is shown, which means it shows week number 1 - 9 correctly, but 10, 11, 12... etc. all show just 1. Week 21, 22, 23... etc. show only 2.
Tried it in a fresh Guest Account, so not an issue with my .plist files or similar.Doesn't for me unfortunately with the Calendar List hidden, as to be seen below. I think it could have something to do with resolution and screen space of the display, since resizing the window tends to fix it for specific widths and heights. I'm using a Thunderbolt Display with my rMBP.
-
Can you change the week numbers to start from August?
When using the Calendar Application on my MAC, using OS Yosemite, I really want to see the week numbers but not from the 1st January, but from 1st August, or even 1st April. This would allow users to view it by Financial Year, Academic Year or Calendar Year. Any ideas if this is possible?
Hi,
It is not possible to change the extension in Muse at the moment. You can export the site as HTML and change the extensions outside the Muse.
Regards,
Aish -
Weeks numbers (year view)
Yosemite, Calendar:
In the year view the week numbers are completely wrong? But in day, week and month are ok.
How could I see the correct numbers in the year view, please?
Regardsthere is unfortunately no year view available in ical at the moment.
may i suggest you send your suggestions to apple: http://www.apple.com/feedback/ical.html -
How do you print a monthly calendar showing week numbers?
Is there a way to display and the print the week numbers in the monthly view in iCal. I can get the calendar to start on the first day of the wekk, Monday, but I can not find any way to show the week numbers in a column to the left of the Monday column.
Roger is right. You'll have to subscribe to a week numbering calendar in order to see week numbers. I've done this and can confirm that they show when printed.
-
Ical week numbers and heat map missing in preferences
Hi,
This page describes that you can turn on/off the heat map and week numbers:
http://www.controlyourmac.com/2012/02/10-amazing-features-of-ical-5-on-os-x.html
I migrated from 10.6 to 10.7.4 and wonder where these checkboxes are.
So, the configuration looks different. There is no Alerts part and no heat map and no week view. May this be due to the fact that I migrated from 10.6. and some configuration files got screwed up?
Thank you very much for any help!Have you told Apple that you would like to see this feature included in iCal? You can do so at OS X Feedback, but there is no point in saying it in the discussions because Apple very carefully does not read postings on this user-to-user site.
-
Any function module for getting fiscal year week numbers
can any one provide me function module for getting fiscal year week numbers ? if no function module please let me know work around.
Thanks!
Lakshmikandhhi,
Use FM <b>'DATE_GET_WEEK'</b>...
parameter D1 LIKE SCAL-DATE.
Data w like scal-week.
CALL FUNCTION <b>'DATE_GET_WEEK'</b>
EXPORTING
date = D1
IMPORTING
WEEK = W
EXCEPTIONS
DATE_INVALID = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
write W+4(2).
Regards,
Santosh -
I installed a program to show the week numbers in iCal.
I don't like it because it also places a bar with the week number across all the week's days.
Now I want to remove it, but can't figure out how.
Any advice?
Powerbook G4 12" Mac OS X (10.4.9)Hi John,
Fantastic !
It worked.
All the best,
Robert
Hi Robert,
They shouldn't be too difficult to get rid of. Make
sure you back up your iCal data in case things get
messed up. (in iCal: File > Backup Database...)
(In this I am assuming the events have titles like
'Week 1', 'Week 2' etc.)
In the calendar list (on left side in iCal) uncheck
all calendars apart from the one that has the week
number events (your 'birthday' calendar).
On the lower right of the main iCal window there is a
button with 3 horizontal lines (the search button).
With nothing in the search box, click this button.
The search results pane will appear with all the
events in your 'birthdays' calendar.
You can re-order these by date, title, priority etc.
by clicking the title on the relevant column. Click
the title (or name) column header to order by the
event title.
Now scroll down and find the first event that starts
with 'Week'. Click this event. Scroll down and find
the last event that starts with 'Week'. Shift-Click
this event.
All your events starting with 'Week' should now be
highlighted. Delete these.
Let me know how you get on.
Best wishes
John M
Powerbook G4 12" Mac OS X (10.4.9) -
Calendar with week numbers of a current month
Hi
I want to print the week numbers for given month using java program. say example,
January 2009
WK | Mo Tu We Th Fr Sa Su
1 | 1 2 3 4
2 | 5 6 7 8 9 10 11
3 | 12 13 14 15 16 17 18
4 | 19 20 21 22 23 24 25
5 | 26 27 28 29 30 31
Please somebody can help me in this regard?
Thanks,
SridharI don't think you will have an issue printing out this list once you have figured what day a particular date falls on. Jan 1st 2009 falls on a Thursday. To find that out use the [GregorianCalendar |http://java.sun.com/javase/6/docs/api/java/util/GregorianCalendar.html] class. You can use the setTime method in this class to set a date, then use the get(Calendar.DAY_OF_WEEK) method to find out the day of the week.
-
How can I add week numbers to iCalendar?
I have some business contacts who use calendar week numbers. For example, this is week 29. How can I add them to iCalendar?
I don't see any thing in iCal preferences to do that. However, an entire community forum for iCal:
https://discussions.apple.com/community/applications/ical -
Hi
I've tried to figure out where I've gone wrong here. I've tried to make an application to keep track of time spent in different Projects and activities within them. I want the user to quickly to have access to the last 6 weeks in a Combobox. I haven't quite
got it yet since my code finds week 53 last year (2014) and dissregards week 1 (2015).
I'll state right away I'm not an experienced VB programer so maybe I've missed something trivial.
Thanks in advance
//Tony
Public
SubWeeknumber()
DimmyCI
AsNewCultureInfo("sv-SE")
Dimdfi
AsDateTimeFormatInfo=
DateTimeFormatInfo.CurrentInfo
Dimcal
AsCalendar=
myCI.Calendar
DimcurrentTime
AsSystem.DateTime=
System.DateTime.Now
Dimdate1
AsDate=
currentTime.Date
Dimweek
AsInteger=
cal.GetWeekOfYear(date1, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
Dimweekcounter
AsInteger
weekcounter = -5
'*********************Does not work properly, claims there is a week 53 2014, which there is not. Skips week 1 for some
reason
Whileweekcounter <= 0
Dimnumber_of_weeks_back
AsInteger
Dimlast_week
AsSystem.DateTime=
currentTime.Date.AddDays(number_of_weeks_back)
Dimprevious_week
AsInteger=
cal.GetWeekOfYear(last_week, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
ComboBox_week.Items.Add(
String.Format("{0}",
previous_week))
weekcounter = weekcounter + 1
number_of_weeks_back = number_of_weeks_back - 7
EndWhileThe thing is that the GetWeekOfYear method returns the week of the year of the date you pass in, i.e. when you pass in 2014-12-29 it will return 53 instead of 1.
How to determine the number of the week is varies between different countries. In Sweden (sv-SE) and most other European countries, the ISO-8601 standard is used:
http://sv.wikipedia.org/wiki/Veckonummer
Then week 1 of a year is per defintion the week that contains the 4th day of January. You will have to write some code to determine this yourself since there is a slight difference between ISO-8601 week and .NET's week numbering:
http://stackoverflow.com/questions/11154673/get-the-correct-week-number-of-a-given-date
Here is an example for you that should work:
Public Sub Weeknumber()
Dim myCI As New CultureInfo("sv-SE")
Dim dfi As DateTimeFormatInfo = DateTimeFormatInfo.CurrentInfo
Dim cal As Calendar = myCI.Calendar
Dim currentTime As System.DateTime = System.DateTime.Now
Dim date1 As Date = currentTime.Date
Dim currentWeek As Integer = cal.GetWeekOfYear(date1, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
Dim diff As Integer = date1.DayOfWeek - myCI.DateTimeFormat.FirstDayOfWeek
If (diff < 0) Then
diff += 7
End If
Dim startOfCurrentWeek As DateTime = date1.AddDays(-1 * diff).Date
For i As Integer = 0 To 5
Dim startOfWeek As DateTime = startOfCurrentWeek.AddDays(-i * 7)
Dim endOfWeek As DateTime = startOfWeek.AddDays(6)
Dim week As Integer = cal.GetWeekOfYear(startOfWeek, myCI.DateTimeFormat.CalendarWeekRule, myCI.DateTimeFormat.FirstDayOfWeek)
If Not startOfWeek.Year.Equals(endOfWeek.Year) And endOfWeek.Day >= 4 Then
week = 1
End If
ComboBox_week.Items.Add(String.Format("{0}", week))
Next
End Sub
Please remember to mark helpful posts as answer to close your threads. -
Displaying week numbers in a calender
Hi all,
I read a thread from 1999 which asks about showing week numbers in a calender. A reply said that this will be added to later versions of HTML_DB.
Does anybody know if this feature has been added to ver 2.0 ? If so, how is it achieved ?
Many thanks to all who reply
RobRobert,
I think you ment this thread How to show the weeknumber in front of the calendar weeks
But this is a thread from november 2005 about HTMLDB 2.0.
1999 is my register date.
So this isn't solved yet, you have to wait for a later version.
Fred. -
ADDING WEEK NUMBERS IN THE CALENDAR OF IPHONE
Hi,
haven't found option of adding week numbers on my iphone 3gs calendar. in working life week numbers are pretty important and would need the option on daily basis. i syncronise my calendar from office outlook / exchange. office supports the feature, but week numbers dont follow.
any ideas anyone?!I use Google calendar and sync it to my iPhone calendar over the air via Google Sync. There are a number of "gadgets" or sub-calendars you can add to your Google calendar (i.e. Moon phases, contacts birthdays, etc.) that will sync over to iPhone. I searched for week numbers and sure enough there is a "gadget" that will add this functionality with an option of weeks starting on Sundays or Mondays. Though I've never used them, I now have week numbers on my iPhone calendar.
You would have to set up a free gmail account to create a google calendar but you wouldn't need to use it (mail or calendar) except to sync week numbers if you don't want to. If you want to go through the (relatively) small amount of trouble to do this just start a gmail account and then follow these instructions: http://www.google.com/support/mobile/bin/answer.py?answer=138740&topic=14252
Except of course you will only turn on calendar. Then (on your MAC) go to your gmail and click on 'calendar' in the upper left. From there click on 'settings' in the upper right, then on the 'labs' tab. Enable the option to 'Add any gadget by URL.' Save this setting then go back to the calender itself and on the right where it says 'Gadget URL' paste http://sites.google.com/site/gcalweeknumbers/Home/calendar-gadget.xml
Then, on your phone's web browser go to http://m.google.com/sync and sign in with your gmail info. Bookmark this page. Select your device and check the boxes for 'My Calendars' and 'Week Numbers'. Now when you open the calendar app on iPhone tap 'calendars' on the upper left and you should see (yourname)@gmail.com (Exchange) with 'Week Numbers' listed below it. Make sure you are viewing 'All Calendars' within the app and week numbers will show up on the Sunday or Monday of each week.
I apologize if these directions are not clear enough or too wordy. I tried to describe it for someone without much experience with this stuff (meaning myself). It may seem like a lot of trouble, but if you really want week numbers you can do it! -
Can Calendar show week numbers?
Is there some setting in Calendar to enable the showing of week numbers?
Rick,
Check your settings in System Preferences...>Language & Region. -
Issue with Week Numbering !!!
Hey All,
I have an query regarding the week numbering. I need to generate a report . The Spec is as follows :
There are certain number of employees in a project with their work start date and end date with regards to the project (project assigment column). I would want to create a project report of all the employees who worked in that particular project between the weeks that i want.
Example i want to know the employees who worked in this project between the weeks 46 and 52. The input parameter is start week (just the number between 1 to 53) and the end week parameter is calculated as plus 6 weeks of the start week .
It is kinda urgent issue for me.
Plz help me ressolve the issue.
Thank You All.
SST.you can try something like this.
SQL> create table t
2 as
3 select to_date('01-01-2008','dd-mm-yyyy')+(level-1) dt
4 from dual
5 connect by level <= 365
6 /
Table created.
SQL> var week number
SQL> exec :week := 42
PL/SQL procedure successfully completed.
SQL> select *
2 from t
3 where to_char(dt,'ww') = :week
4 /
DT
14-OCT-08
15-OCT-08
16-OCT-08
17-OCT-08
18-OCT-08
19-OCT-08
20-OCT-08
7 rows selected.
SQL> select *
2 from t
3 where to_char(dt,'ww') between :week and :week+6
4 /
DT
14-OCT-08
15-OCT-08
16-OCT-08
17-OCT-08
18-OCT-08
19-OCT-08
20-OCT-08
21-OCT-08
22-OCT-08
23-OCT-08
24-OCT-08
DT
25-OCT-08
26-OCT-08
27-OCT-08
28-OCT-08
29-OCT-08
30-OCT-08
31-OCT-08
01-NOV-08
02-NOV-08
03-NOV-08
04-NOV-08
DT
05-NOV-08
06-NOV-08
07-NOV-08
08-NOV-08
09-NOV-08
10-NOV-08
11-NOV-08
12-NOV-08
13-NOV-08
14-NOV-08
15-NOV-08
DT
16-NOV-08
17-NOV-08
18-NOV-08
19-NOV-08
20-NOV-08
21-NOV-08
22-NOV-08
23-NOV-08
24-NOV-08
25-NOV-08
26-NOV-08
DT
27-NOV-08
28-NOV-08
29-NOV-08
30-NOV-08
01-DEC-08
49 rows selected.
Maybe you are looking for
-
Moving HP P1102W Printer from One Address to Another Address
I have defined the above-mentioned printer to my Hp ePrint account and have an hpeprint.com email address for the printer. I have also used this hpeprint.com email address in my Google Cloud Print account. If I move from one address to another addres
-
Safari quits all the time and will not relaunch! Any suggestions?
I can't Launch safari on my imac! Every time i try I keep getting this error message.... Can anyone help?
-
How to configure FTP Adapter in BPEL PM 10.1.2 Beta3?
Greetings all! I am working on a legacy integration using BPEL PM. I need to use FTP adapter. There is little information in the Beta Documents on FTP Adapter. Can anyone point me to the right direction on how to configure the FTP Adapter, or where t
-
How to view songs that were recently downloaded, but not yet assigned to a play list?
I am using the new iTunes, version 11.0.2. In the older version, there was a category for last downloads. This allowed me to to view all the downloads in one place then assign them to a playlist. Is this hidden somewhere or there is another way to se
-
Home sharing and air play not working with 11.1.1.11
I upgraded to recent i Tunes and now I cannot access Airplay or Home Sharing help