Module:ScheduleList:修订间差异

跳转到导航 跳转到搜索
无编辑摘要
无编辑摘要
第75行: 第75行:
         }
         }
          
          
         -- 格式化当前行,添加 class
         -- 格式化当前行
        local formatted_line
         if class ~= "" then
         if class ~= "" then
             table.insert(result, string.format('<div class="%s">%s<small>%s</small> %s</div>', class, ruby_output, week_day, title))
             formatted_line = string.format('<div class="%s">%s<small>%s</small> %s</div>', class, ruby_output, week_day, title)
         else
         else
             table.insert(result, string.format('%s<small>%s</small> %s', ruby_output, week_day, title))
             formatted_line = string.format('%s<small>%s</small> %s', ruby_output, week_day, title)
         end
         end
          
          
         -- 更新日期和周几
         -- 添加到结果表,并在每行后添加换行符
         current_date = get_next_date(current_date, leap_year)
         table.insert(result, formatted_line)
        current_weekday = (current_weekday % 7) + 1
     end
     end
      
      
     -- 返回结果,每行分开
     -- 返回结果,每行独立输出并换行
     return table.concat(result, "\n")
     return table.concat(result, "\n")
end
end


return p
return p