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,
Sridhar

I 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.

Similar Messages

  • Iphone and ipad agenda with week numbers

    does anybody now a very good agenda for iphone and ipad with week numbers etc etc

    Yes, meetings recorded in Adobe Connect will not play back on iOS devices.
    Live meetings can be attended with the Adobe Connect Mobile for iOS app, but this app only supports live meetings.
    https://itunes.apple.com/us/app/adobe-connect-mobile-for-ios/id430437503?mt=8

  • 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.

  • 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.

  • How do I get a calendar to start displaying on the current month, instead of January?

    I'm helping to develop a scheduling application, and we want the current calendar month to display first, with the 'Previous' and
    'Next' buttons for preceeding and succeeding months. So far, we haven't been able to figure it out.

    Krishnamurthy has a workaround please see thread http://forums.oracle.com/forums/message.jsp?id=827915 for details
    Sunil.

  • Calendar does not show events for current month unless I switch away and back

    I have had this issue on my iPad 1st gen (with OS 5.1, also happened on previous OS version) where when I open my calendar in month view, the entire month will be blank (have no events showing). I have to swipe to a different month and then back to the first month, and then it will show all of my events for the month. This is a pretty annoying bug. Are there any fixes for this?
    edit: I see this has also been reported at https://discussions.apple.com/message/17750848

    Happening to me, too.  Started with 5.0 and continues on 5.1.  I referenced your thread in the one that you listed, just to keep them linked up and build up a list of affected users.

  • Calendar with preselected dates based on current date

    Can we get the calendar to be prepopulated with todays' date and today-7 date as the default before it starts running the initial queries when I log into dashboard.
    I have a calendar date range based on which my chart displays metrics. If I dont choose anything its picking up all the data first before I choose something
    Your help is always appreciated.

    I apologize I read your post too quickly and misunderstood your question. Unfortunately, I thought you were referring to a dashboard you had created and asking about setting up default dates for your bind variables/parameters.
    Well I'll have to leave this one to someone else. Sorry I couldn't be more help.
    David

  • 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!

  • Get Week Number of Current Month

    How can I get the week number of the current month (1-5)?
    This is what I have tried and I'm not getting the expected
    results.

    quote:
    Originally posted by:
    DJ5MD
    Does your go 1-5 since it's only 30 days? Is that the
    difference?
    I think he was referring to your comment "How can I get the
    week number of the current month (1-5)?". Some months can have 6
    weeks so you should take that into account.
    Both the function from cflib.org and his code should return 6
    for 2007-09-30.

  • Current Month vs. YTD

    I am wanting to show account balances for the Current Month vs. Year to Date. I am using a BSO cube and have heard that Dynamic Time Series don't work in OBIEE, which is where we're going to be building reports off this data. We want this calculation to be available from multiple front ends so we need to do the calculation in the cube.
    I followed the following two suggestions to form a hybrid approach:
    http://www.intellientblog.co.za/index.php/tag/essbase-ytd-calculation/
    http://www.network54.com/Forum/58296/thread/1147201898/YTD+variance+calc
    I created a new dimension with two members - Current Month (just a stored member) and YTD (dynamic calc) with the following formula: @SUMRANGE("Current Month",@CURRMBRRANGE ("Date", LEV, 0, -(@count (skipmissing, @lsiblings (@currmbr ("Date")))), 0));
    At first I thought this was working great, I filtered down to a month in the Date dimension and everything looked good. However, my Date dimension (which is my time dimension) is set up like so:
    Year
    --Quarter
    ----Month
    Which made it so my formula gave me QTD. I modified my formula to: @SUMRANGE("Current Month",@CURRMBRRANGE ("Date", LEV, 0, -(@count (skipmissing, @lsiblings (@currmbr ("Date")))+@count(skipmissing,@lsiblings(@parent(@currmbr("Date"))))*3), 0));
    This doesn't work though - it always gives me quarter to date. When I have -(@count (skipmissing, @lsiblings (@currmbr ("Date")))+@count(skipmissing,@lsiblings(@parent(@currmbr("Date"))))*3) as the formula for a member it gives me the correct number, but as part of the YTD formula it always gives me 0.
    Any ideas why this would be happening?

    Ah apologies, had forgotten to ask if year and period are in the same dimension. So your Date dimension actually looks like:
    2011
    - Qtr1
    -- Jan
    -- Feb
    -- Mar
    - Qtr2
    -- Apr
    -- etc
    2012
    - Qtr1
    -- Jan
    -- etc
    If this is the case then I think you have two options:
    1. You set up an IF statement where the step back varies by period, e.g.
    IF(@ISMBR (Jan))
    YTD = @SUMRANGE("Current Month", @CURRMBRRANGE ("Date", LEV, 0, 0, 0));
    ELSEIF(@ISMBR(Feb))
    YTD = @SUMRANGE("Current Month", @CURRMBRRANGE ("Date", LEV, 0, -1, 0));
    ELSEIF(@ISMBR(Mar))
    YTD = @SUMRANGE("Current Month", @CURRMBRRANGE ("Date", LEV, 0, -2, 0));
    etc
    ELSEIF(@ISMBR(Dec))
    YTD = @SUMRANGE("Current Month", @CURRMBRRANGE ("Date", LEV, 0, -11, 0));
    ENDIF
    If you have multiple Jan's e.g. Jan2011, Jan2012 you may want to assign a UDA and change the above to be IF(@ISUDA(Date, Jan)) and so on
    2. Set up a member to store the offset value as a dynamic calc, lets call it OffsetYTD, you would need to have a similar IF, ELSEIF, ENDIF formula but no need to repeat all the range bits, e.g.
    IF(@ISMBR(Jan))
    0;
    ELSEIF(@ISMBR(Feb))
    -1;
    etc
    then your YTD formula becomes simpler:
    YTD = @SUMRANGE("Current Month", @CURRMBRRANGE("Date", LEV, 0, OffsetYTD, 0));
    If the offset is something you can re-use in other formulae / reports then I like option 2 (WFP and CapEx modules for Hyperion Planning use similar concepts for TP-Index and NumPeriods)
    Hope this helps
    Stuart

  • New lot size - consolidates the requirements in the past + current month.

    Hi All,
    My client has requirment where he needs a monthly lot size "MB" for the Raw materials but that lot size must consolidate the requirements in the past month as well with the requirment of the current month so that we only have one requirement.
    In current scenario if we use MB lot size and if we have requirment of 100 pc in month of May and 100 PC in month of June then 2 PR will be created. One for Last month and another for this month. Client wants only one PR for both month and wants Last month requirment sto be clubed with this month requirment it self.

    There are more that 1000 Raw materials and most of them have past due requirments. Reason that it has to be done during PR stage it self taht combining different PR to single materials so many materials will be very difficult and time consuming. 
    Thanks for suggestion though. But client did not accept it.

  • Calendar to get week number of current month

    Hi All,
    Description: Currently I am working on an application which require to calculate some data for current month from a database where I have the data of all the previous and current month of that year, I can take week number as criteria.
    Help Required: I can find week of month or year using Calendar methods but how to find the first week on the current month only.
    Lets suppose the current month is April so when I use, int weekofmonth = cal.get(cal.WEEK_OF_MONTH);
    it will return me the number of present week however I want to get what would be the week number at the start of the month (April).
    Hope I am able to describe my query properly.
    Thanks in advance.
    Amit

    / ====================================================
    Method: Get the desired Date format for the date
    Developed By: Sandip Waghole [29-Jan-2010]
    ==================================================== /
    public String getWeekNo(String strDate)
    // input Date Format : M/dd/yyyy
    int weekNo=0,i=0;
    String strWeekNo=null;
    int noOfDaysInTheYear=365;
    int WEEK_STARTS_ON = 1; // Define the day on which week starts Sunday/Monday 1:Sunday 2:Monday
    int firstDayNoInFirstWeekOfPresentYear=0; // Inititalize teh day on which week is starting in present year
    int firstDayOfPresentYear=0; // Inititlize the 1st day of the present year whether Sunday/Monday/.....
    int[] monthDaysArray = {31,28,31,30,31,30,31,31,30,31,30,31}; // Define array of the days as per months
    int todaysDayNoInPresentYear=0;
    int daysLateByFirstWeekStartedAfterYearStarted=0;
    int intTemp=0;
    //strDate="08/24/2000"; // For test purpose
    StringTokenizer strDateTok = new StringTokenizer(strDate, "/ ");
    int month = Integer.parseInt(strDateTok.nextToken());
    int day= Integer.parseInt(strDateTok.nextToken());
    int year = Integer.parseInt(strDateTok.nextToken());
    GregorianCalendar cal = new GregorianCalendar();
    // Check if present year is leap year
    boolean boolIsLeapYear = cal.isLeapYear(year);
    // If it is boolean year then add 1 to total days in the year & add one more day to february
    if(boolIsLeapYear)
    noOfDaysInTheYear=noOfDaysInTheYear+1;
    monthDaysArray[1]=monthDaysArray[1]1;
    // Find the 1st day of this year
    Calendar calObj = new GregorianCalendar(year, Calendar.JANUARY, 1);
    firstDayOfPresentYear = calObj.get(Calendar.DAY_OF_WEEK);
    int intRemoveNoOfDaysFromWeek=0;
    // # Find the day no of prsent day
    for(i=0;i<month;i+) // get no of days till present year
    intTemp = intTemp monthDaysArray;
    todaysDayNoInPresentYear = intTemp - (monthDaysArray[month-1]-day);
    if(firstDayOfPresentYear==6 || firstDayOfPresentYear==7) // If first Day is Friday or Saturday then it is week
    // Identify the the day no on which 1st week of present year is starting
    firstDayNoInFirstWeekOfPresentYear = 7 - firstDayOfPresentYear WEEK_STARTS_ON 1;
    // Find delay in the 1st week start after r=the year start
    daysLateByFirstWeekStartedAfterYearStarted = firstDayNoInFirstWeekOfPresentYear - 1;
    // Now week is starting from Sunday
    weekNo = (Integer)((todaysDayNoInPresentYear-daysLateByFirstWeekStartedAfterYearStarted)/7);
    // Find the day no of today
    intTemp = (todaysDayNoInPresentYear-daysLateByFirstWeekStartedAfterYearStarted) % 7;
    if(intTemp > 0)
    weekNo=weekNo+1;
    else
    weekNo=weekNo;
    else
    // 1st week is starting on 1st Of January
    firstDayNoInFirstWeekOfPresentYear=firstDayOfPresentYear;
    // Remove no. of days from the 1st week as week is starting from odd Sunday/Monday/Tuesday/Wednesday/Thursday
    intRemoveNoOfDaysFromWeek = 7-firstDayOfPresentYear 1; // 1 added as include start day also
    // So one week will be added in no. of weeks
    weekNo = (Integer)((todaysDayNoInPresentYear-intRemoveNoOfDaysFromWeek)/7);
    // Find the day no of today
    intTemp = (todaysDayNoInPresentYear-intRemoveNoOfDaysFromWeek) % 7;
    weekNo = weekNo +1; // As 1st weeks days are reduced from the todays day no in the year
    if(intTemp > 0)
    weekNo=weekNo+1;
    else
    weekNo=weekNo;
    // Remove the no. of days from the week 1
    strWeekNo=Integer.toString(weekNo);
    return strWeekNo;
    // Any issues please mail on [email protected] or [email protected]

  • URL for viewing current month calendar

    We are using iCal to publish and view our school calendar. We have a mixed computer environment of Macs and PC. The principal has a Mac and creates calendar events in iCal and it is automatically uploaded to our .Mac account and published as a web page.
    The PC's have active desktop set to the school's calendar web page. This allows them to view the web page (the school's calendar) generated by iCal right on the desktop. The Macs automatically launch iCal which has subscribed to the school's Calendar.
    My question has to do with the URL which I should set up for the PC's. If I use the default URL (http://ical.mac.com/dberg/argyle) the calendar is viewed in weekly view. We want it to view in monthly view so instead last month we set it to http://ical.mac.com/WebObjects/iCal.woa/wa/default?d=1&u=dberg&v=1&y=2005&m=8&n= argyle.ics which views the month. Then the month changed but the calendar didn't so we experimented with the URL and deleted the &m=8 value and that worked. It seems to now always display the current month. Then we noticed that the year value is still in the URL (&y=2005) so we are going to delete that value as well. My question is should we also delete the "d=1&" value as well? It seems to work without it but I don't really know wha that d value is all about. We noticed that if &v=1 is removed it goes back to week view so we want to leave that in.
    Any other hints as to what URL values to use so that no matter what year or month it is it will always show the current year?

    Dave,
    when you switch to Preferences, you'll see 2 sections: "Page View" and "Calendar View". Directly written under Calendar View you should see "Default calendar:" and a list field (sorry, I don't know the exact English term). You can change the entry of this field from "Weekly" to "Monthly" – at least that's what I can do on your ical

  • Getting the exact date of current week and current month

    I would like to know is there any methods to know the exact date of the current week and current month?

    //use this function like this
    //String date = getNow();
    public static String getNow()
         Calendar cal = new GregorianCalendar();
         // Get the components of the time
         int hour24 = cal.get(Calendar.HOUR_OF_DAY); // 0..23
         int min = cal.get(Calendar.MINUTE); // 0..59
         int sec = cal.get(Calendar.SECOND); // 0..59
         // Get the components of the date
         int year = cal.get(Calendar.YEAR); // 2002
         int month = 1 + cal.get(Calendar.MONTH); // 0=Jan, 1=Feb, ...
         int day = cal.get(Calendar.DAY_OF_MONTH); // 1...
         String timeStamp = String.valueOf(year) + "-" + addZero(month)+ "-" + addZero(day)
              + " " + addZero(hour24)+ ":" + addZero(min) + ":"+ addZero(sec) + ".0";
         return timeStamp;
    public static String addZero(int num)//this function works with the getNow() function
    //all it does is adds a zero to an int if its less then ten
         String val = "";
         if(num < 10)
         val +="0"+num;
         }else{
         val = String.valueOf(num);
         return val;
    }

Maybe you are looking for

  • Delivering on your top feature requests!

    Dear Adobe EchoSign community -- As Fall starts to settle in, [at least in the Northern Hemisphere], I wanted to share progress we've made on your feature requests.  As context, our team sits down weekly to review your top feature requests that come

  • Dynamically making fields editable or non editable according to ddl value.

    Hi All, In my case I have a drop down field having various values on ADOBE form.According to those values the remaining fields in the form should get visible or invisible accordingly. Can you please help me out in javascripting required in this case?

  • Export from FCP as QT 4:3, Compressor Set at 4:3; ends up anamorphic. Why?

    I tried 3 ways: Export as QT, Using QT conversion,and through Compressor. Each time Settings were DV NTSC 4:3 in both QT and Compressor. Yet when going to DVD Studio Pro it's anamorphic. I checked the QT: it was anamorphic too! Does anybody have an a

  • Archiving pricing documents

    Hi  Experts, Please let me know if there is any standard function module  to archieve pricing documents(IS-Retail) . Thanks Koyel

  • Need Aperture help

    I am having a problem sending images to recently installed Photoshop 5.  If I export an image to my desktop, I can then open in PS with not problem.  The both work fine independently but not with each other.  I keep getting this error message. Editin