Class Entry

Hierarchy

  • Entry

Implements

  • SubjectContainer

Constructors

  • new Entry(date: string | Date, day: string, className: string[], period: number, type: string, oldSubject: string, newSubject: string, oldRoom: string, newRoom: string, description: string): Entry
  • Parameters

    • date: string | Date
    • day: string
    • className: string[]
    • period: number
    • type: string
    • oldSubject: string
    • newSubject: string
    • oldRoom: string
    • newRoom: string
    • description: string

    Returns Entry

Properties

className: string[]
date: Date
day: string
description: string
newRoom: string
newSubject: string
oldRoom: string
oldSubject: string
period: number
subjectShorts: Map<string, string> = ...
type: string

Accessors

  • get exactDateAndTime(): Date
  • This property returns a Date object, that represents the exact Day, month, year, hour and minute of the lesson

    Returns Date

  • get longNewSubject(): string
  • The newSubject property is only the short of the subject. Here you get the full name of a subject.

    Example

    // entry.newSubject = "E"

    entry.longNewSubject
    // -> Englisch

    Returns string

  • get longOldSubject(): string
  • The oldSubject property is only the short of the subject. Here you get the full name of a subject.

    Example

    // entry.oldSubject = "WI"

    entry.longOldSubject
    // -> Wirtschaft

    Returns string

  • get realTime(): Date
  • The entry only holds a period attribute, which does not represent actual time. This function gives you the real time of the lesson.

    This function assumes that the first period takes place at 07:30 and one period takes 45 minutes.

    Returns

    Real time of the lesson

    Returns Date

Methods

  • check if this entry equals another entry

    Returns

    whether the entries are equal

    Parameters

    • other: Entry

      the entry to compare to this one

    Returns boolean

  • Parameters

    • subjectShort: string

    Returns string

  • Update the subject shorts with a map

    Example

    entry.updateSubjectShorts(new Map([["D", "Deutsch"]]))
    

    Parameters

    • subjectShorts: Map<string, string>

      the subject shorts mapped to their long name

    Returns void

  • Create a new instance from JSON

    Returns

    A new Entry instance

    Parameters

    • data: object

      The JSON data

    Returns Entry

Generated using TypeDoc