Skip to content

Commit 9687af2

Browse files
committed
add: lastUpdate
1 parent 05499e7 commit 9687af2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/parser.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ const analyzeRow = (columns: string[]) => {
121121
schedules: [],
122122
instructor: columns[8],
123123
error: false,
124+
lastUpdate: new Date(columns[16] + '+09:00'), // JST保証
124125
}
125126

126127
const moduleString = columns[5]
@@ -181,7 +182,7 @@ export default (data: Buffer): Course[] => {
181182
console.log('● Parsing')
182183
for (let r = 5; ; r++) {
183184
const columns: string[] = []
184-
for (let c = 0; c < 16; c++)
185+
for (let c = 0; c <= 16; c++)
185186
columns.push(sheet[utils.encode_cell({ r, c })].v)
186187
if (columns[0] === '') break
187188
courses.push(analyzeRow(columns))

src/types.ts

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ export interface Course {
1414
}[]
1515
instructor: string
1616
error: boolean
17+
lastUpdate: Date
1718
}
1819

1920
export enum Module {

0 commit comments

Comments
 (0)