| Quintiq file version 2.0 | 
| #parent: #root | 
| Method InitializeMonth ( | 
|   LibCal_SubscriberEventTable table, | 
|   LibCal_SubscriberEventRow row, | 
|   DateTime starttime, | 
|   DateTime endtime | 
| ) | 
| { | 
|   TextBody: | 
|   [* | 
|     // 甄兰鸽 May-29-2024 (created) | 
|     for(  startTime := starttime; startTime < endtime; startTime := startTime.StartOfNextMonth() ){ | 
|       time := startTime; | 
|       if( starttime = startTime ){ | 
|         time := startTime.StartOfMonth(); | 
|       } | 
|       column := selectobject( table, LibCal_SubscriberEventColumn, column, column.Name() = time.Format( 'M/D/Y' ) ); | 
|       if( isnull( column ) ){ | 
|         column := table.LibCal_SubscriberEventColumn( relnew, Name := time.Format( 'M/D/Y' ), Period := time.Date() ); | 
|       } | 
|        | 
|       duration := startTime.StartOfNextMonth() - startTime; | 
|       if( startTime.StartOfNextMonth() > endtime ){ | 
|         duration := endtime - startTime; | 
|       } | 
|     //  info( startTime, column.Name(), duration.AsQUILL(), duration.HoursAsReal() ); | 
|       cell := column.LibCal_SubscriberEventCell( relnew, Value := [String]duration.HoursAsReal() ); | 
|       row.LibCal_SubscriberEventCell( relinsert, cell ); | 
|     } | 
|   *] | 
| } |