Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-47114

format_time function claims to support weeks, but doesn't

    XMLWordPrintable

    Details

      Description

      The format_time function in moodlelib.php has documentation comments that suggest it will return e.g. "2 weeks" but the code goes straight from days to months.

      Format a date/time (seconds) as weeks, days, hours etc as needed

      Given an amount of time in seconds, returns string formatted nicely as weeks, days, hours etc as needed

      One fix would be to update the comments to reflect the code but actually supporting weeks would be nicer than "28 days ago" etc.

        Attachments

          Activity

            People

            Assignee:
            rezaie9 Shamim Rezaie
            Reporter:
            bawjaws David Scotson
            Peer reviewer:
            Simey Lameze
            Integrator:
            Andrew Nicols
            Tester:
            Andrew Nicols
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, David Mudrák (@mudrd8mz), Helen Foster, Barbara Ramiro, Bas Brands
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/Jan/18