Options

Any math wizards in here?

magnificentmagnificent Posts: 2,976
Forum Member
✭✭✭
Is there a way to work out on a calculator how many days there are between:

13 June 2012 and 24 March 2013 inclusive?
«1

Comments

  • Options
    artnadaartnada Posts: 10,113
    Forum Member
    ✭✭
    I'm sure a maths wizard will be along soon.
  • Options
    MaxatoriaMaxatoria Posts: 17,980
    Forum Member
    ✭✭
    know your rhyme about the months and days and just work it out its not hard maths
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    Yes I know how to do it manually but need to know if there is a way to work it out on a calculator.
  • Options
    MudboxMudbox Posts: 10,110
    Forum Member
    ✭✭
    From and including: Wednesday, 13 June 2012
    To, but not including Sunday, 24 March 2013
    Result: 284 days

    It is 284 days from the start date to the end date, but not including the end date

    Or 9 months, 11 days excluding the end date
    http://www.timeanddate.com/date/durationresult.html?d1=13&m1=06&y1=2012&d2=24&m2=03&y2=2013
  • Options
    MaxatoriaMaxatoria Posts: 17,980
    Forum Member
    ✭✭
    never seen any date functions on a normal calculator and even on my ti-83 i cant remember seeing anything like that
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    Mudbox wrote: »

    Yes I'm aware of the web based platforms that do this but I want to be able to work it out on a calculator.
  • Options
    [Deleted User][Deleted User] Posts: 8,916
    Forum Member
    As long as you know how many days there is in each month, then it's simple to work out as it is basic arithmetic.
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    Maxatoria wrote: »
    never seen any date functions on a normal calculator and even on my ti-83 i cant remember seeing anything like that

    Indeed, but there may be some sort of a formula to enable a calculation on a calculator, no?
  • Options
    Paul_DNAPPaul_DNAP Posts: 26,108
    Forum Member
    ✭✭✭
    Yes I know how to do it manually but need to know if there is a way to work it out on a calculator.

    No.

    Your calculator won't know how many days in each moth, you will need to provide that information. You can use the calculator to subtract the dates you are looking at from total days in the month.

    You can do date subtractions on Excel.
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    As long as you know how many days there is in each month, then it's simple to work out as it is basic arithmetic.

    In theory - yes.
  • Options
    MudboxMudbox Posts: 10,110
    Forum Member
    ✭✭
    if each month was an exact number of days(I mean, all the same), then you could maybe make a formula. As they are all a bit random, you can't really, I don't think.
  • Options
    MaxatoriaMaxatoria Posts: 17,980
    Forum Member
    ✭✭
    heres one with date functions http://www.sharp.net.au/product-archive/products/EL387V/ but it doesn't seem like its a common feature
  • Options
    lemoncurdlemoncurd Posts: 57,778
    Forum Member
    Yes I'm aware of the web based platforms that do this but I want to be able to work it out on a calculator.

    The answer is no. Calculators do not have calendar information built in.

    edit: Apart from that Sharp one^^ :D
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    Maxatoria wrote: »
    heres one with date functions http://www.sharp.net.au/product-archive/products/EL387V/ but it doesn't seem like its a common feature

    This is useful and will consider buying it however I want to be able to calculate it on my own basic calculator.
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    lemoncurd wrote: »
    The answer is no. Calculators do not have calendar information built in.

    edit: Apart from that Sharp one^^ :D

    Good save!:p
  • Options
    MaxatoriaMaxatoria Posts: 17,980
    Forum Member
    ✭✭
    With a basic calculator theres no chance...you'll need to work out the days per month and just add them up
  • Options
    lemoncurdlemoncurd Posts: 57,778
    Forum Member
    TBH, as you are on a computer (presumably), you could just write a simple Perl/Python script to give you the answer.
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    lemoncurd wrote: »
    TBH, as you are on a computer (presumably), you could just write a simple Perl/Python script to give you the answer.

    No doubt but as I say - I want to be able to do it on a calculator.

    There's a math calc. for everything I was once told...
  • Options
    AndrueAndrue Posts: 23,377
    Forum Member
    ✭✭✭
    There isn't really a formula because the number of days in a month vary but several modern computer languages have a function that will do it. Here's how you'd do it in C#:

    http://www.dotnetperls.com/datetime-elapsed

    There will be a VB equivalent but I won't sully my reputation by linking to it :)
  • Options
    MaxatoriaMaxatoria Posts: 17,980
    Forum Member
    ✭✭
    of course theres a formula (days in first month - any days before) + (days in month 2)+(days in month 3).....+(days in month 10-any days after)

    but you won't find a nice simple days =sqrt(days*30)/pi formula
  • Options
    PrincessEssexPrincessEssex Posts: 1,414
    Forum Member
    ✭✭✭
    MathS plural in Uk Math singular in USofA
  • Options
    magnificentmagnificent Posts: 2,976
    Forum Member
    ✭✭✭
    MathS plural in Uk Math singular in USofA

    ...there's always one :p

    I will deploy my stock answer which is: the abbreviation maths is preferred in the UK and the abbreviation math is preferred in the USA; both are equally correct. #etymology
  • Options
    bart4858bart4858 Posts: 11,446
    Forum Member
    ✭✭
    Yes I know how to do it manually but need to know if there is a way to work it out on a calculator.

    You can use a calculator to work it out semi-manually; add up the days in the intervening months:
    J  A  S  O  N  D  J  F
    31 31 30 31 30 31 31 28
    
    then add the days from 13th to end of June (17) and from start of March to 24th (24), giving 284 days.

    If you can work out the days to the start of each month in a year, that makes things easier, but you need to prepare a lookup table:
      J   F   M   A   M   J   J   A   S   O   N   D   (J)
      0  31  59  90 120 151 181 212 243 273 304 334 (365)
      0  31  60  91 121 152 182 213 244 274 305 335 (366) (Leap year)
    
    So for 13-June-2012, that is day # 152+13 or 165, and for 24-March-2013 it's day # 59+24 or 83. (Some diaries will give you this day number directly.) Now you're comparing years and days:
     2013  83
     2012 165
    
    To do the calculation, however, you need to normalise the day numbers, that is, make them refer to the start of the same year. With this example, convert the 83 to the number of days from the start of 2012, by adding the number of days in 2012 (366 as it was a leap year), which makes it 83+366 or 449. The calculation is now 449-165 or 284 days.
  • Options
    jsmith99jsmith99 Posts: 20,382
    Forum Member
    ✭✭✭
    Indeed, but there may be some sort of a formula to enable a calculation on a calculator, no?

    We didn't do math at school, but from my maths lessons I know the difference between an expression and a formula. Calculators deal in expressions.
  • Options
    jsmith99jsmith99 Posts: 20,382
    Forum Member
    ✭✭✭
    ...there's always one :p ........

    Whose opinion differs from yours? You'll be lucky if there's only one.
    ......I will deploy my stock answer which is: the abbreviation maths is preferred in the UK and the abbreviation math is preferred in the USA; both are equally correct. #etymology

    One is correct in the UK, the other is correct in the US. I've no idea what the last # and word means.
Sign In or Register to comment.