湖南师范大学自然科学学报
湖南師範大學自然科學學報
호남사범대학자연과학학보
ACTA SCIENTIARUM NATURALIUM UNIVERSITATIS NORMALIS HUNANENSIS
2014年
5期
65-69
,共5页
林娟%周飞亚%周发刚%阳镇涛%唐铸文
林娟%週飛亞%週髮剛%暘鎮濤%唐鑄文
림연%주비아%주발강%양진도%당주문
开课日期%教务%课表%控件%算法
開課日期%教務%課錶%控件%算法
개과일기%교무%과표%공건%산법
date of course start%teaching affairs%curriculum schedule%control%algorithm
存放在数据库中的周课表是没有日期的.用户使用课表或课程进度表时,需要指定一个起点日期,供计算机识别.如果将开课日期计算出来,直接呈现在用户面前,操作会极大地方便或简化.本文利用vfp 的类,实现了开课日期类的制作.方法是将每年的9月1日及元宵节作为基点,取最近的星期一作为开课日期起点.算法有3个公式.程序主要由3个函数构成.其中有2个是日期函数,返回值是日期型,格式为American(月/日/年);另一个是星期一的日月函数,返回值是数值型.6年12个学期,计算的结果与实际开课日期对比,正确率达100%.解决了由人们告诉计算机何时开课,改为由计算机告诉我们何时开课.
存放在數據庫中的週課錶是沒有日期的.用戶使用課錶或課程進度錶時,需要指定一箇起點日期,供計算機識彆.如果將開課日期計算齣來,直接呈現在用戶麵前,操作會極大地方便或簡化.本文利用vfp 的類,實現瞭開課日期類的製作.方法是將每年的9月1日及元宵節作為基點,取最近的星期一作為開課日期起點.算法有3箇公式.程序主要由3箇函數構成.其中有2箇是日期函數,返迴值是日期型,格式為American(月/日/年);另一箇是星期一的日月函數,返迴值是數值型.6年12箇學期,計算的結果與實際開課日期對比,正確率達100%.解決瞭由人們告訴計算機何時開課,改為由計算機告訴我們何時開課.
존방재수거고중적주과표시몰유일기적.용호사용과표혹과정진도표시,수요지정일개기점일기,공계산궤식별.여과장개과일기계산출래,직접정현재용호면전,조작회겁대지방편혹간화.본문이용vfp 적류,실현료개과일기류적제작.방법시장매년적9월1일급원소절작위기점,취최근적성기일작위개과일기기점.산법유3개공식.정서주요유3개함수구성.기중유2개시일기함수,반회치시일기형,격식위American(월/일/년);령일개시성기일적일월함수,반회치시수치형.6년12개학기,계산적결과여실제개과일기대비,정학솔체100%.해결료유인문고소계산궤하시개과,개위유계산궤고소아문하시개과.
The week timetable saved in database is not date of course start.It need a starting point date for computer to distinguish when timetable and curricula schedule are used by user.If the date of the start point is cal-culated and displayed on user's interface,it will greatly simplify the operation.This article introduces the develop-ment of the date of course start by using Class of the Visual FoxPro.The start point is the nearest monday of the base point in September 1st and the Lantern Festival every year.There are three different kinds of formulae in algo-rithm.The main program consists of three functions.The date fuction in this program consists of two parts, and re-turned value is the date type in American style ( month/day/year) .Another function is of an about month and date to get monday, and returned value is in numerous type.The calculating results right rate was 100%compared with practical date of course start for 6 years or 12 semesters.It has exchanged methods when to begin the course that people told computer in the past, and now computer tells us.