This package has been deprecated

    Author message:

    Replaced by native time parsing in the course data ingester; timestrings no longer need to be parsed by JS.

    sto-sis-time-parser

    2.3.3 • Public • Published

    stolaf-sis-timestring-parser

    Build Status

    A parser to take the wierd timestrings from St. Olaf's SIS and turn them into a semi-usable format.

    Example:

    // input
    course = {times: ['MT 0100-0400PM', 'MF 0905-1000']}
     
    convertTimeStringsToOfferings(course, {groupBy: 'day'})
     
    // output
    [
        { day: 'Mo', times: [{ start: 1300, end: 1600 }, { start: 905, end: 1000 }] },
        { day: 'Tu', times: [{ start: 1300, end: 1600 }] },
        { day: 'Fr', times: [{ start: 905,  end: 1000 }] },
    ]

    You can also request that the offerings be grouped like SIS does:

    // input
    course = {times: ['MT 0100-0400PM', 'MF 0905-1000']}
     
    convertTimeStringsToOfferings(course, {groupBy: 'sis'})
     
    // output
    [
        { days: ['Mo', 'Tu'], times: [{start: 1300, end: 1600}] },
        { days: ['Mo', 'Fr'], times: [{start: 905,  end: 1000}] },
    ]

    Keywords

    none

    Install

    npm i sto-sis-time-parser

    DownloadsWeekly Downloads

    1

    Version

    2.3.3

    License

    MIT

    Unpacked Size

    16.8 kB

    Total Files

    10

    Last publish

    Collaborators

    • hawkrives