macro getYYYYMMDDDate()
{
date = GetSysTime(True)
curr_year = date.Year
nMonth = date.Month
if(nMonth<10)
curr_month="0@nMonth@"
else
curr_month="@nMonth@"
// Get current day
curr_day = date.day
if( date.day < 10 )
{
curr_day = "0@curr_day@"
}
tmp_hour = date.hour
curr_hour=tmp_hour
if(curr_hour<10)
curr_hour="0@curr_hour@"
curr_min = date.minute
if(curr_min<10)
curr_min="0@curr_min@"
curr_sec = date.second
if(curr_sec<10)
curr_sec="0@curr_sec@"
curr_time = "@curr_hour@:@curr_min@:@curr_sec@"
szTmpDate = "@curr_year@.@curr_month@.@curr_day@(@curr_time@)"
return szTmpDate
}
macro Paste_Today()
{
szToday=getYYYYMMDDDate()
buf=GetCurrentBuf()
SetBufSelText(buf, szToday)
}
macro Paste_MYOWN_Comment()
{
szMyName = "MY NAME"
szDate = getYYYYMMDDDate()
szComment = "/* by @szMyName@ @szDate@ */"
buf=GetCurrentBuf()
SetBufSelText(buf, szComment)
}
{
date = GetSysTime(True)
curr_year = date.Year
nMonth = date.Month
if(nMonth<10)
curr_month="0@nMonth@"
else
curr_month="@nMonth@"
// Get current day
curr_day = date.day
if( date.day < 10 )
{
curr_day = "0@curr_day@"
}
tmp_hour = date.hour
curr_hour=tmp_hour
if(curr_hour<10)
curr_hour="0@curr_hour@"
curr_min = date.minute
if(curr_min<10)
curr_min="0@curr_min@"
curr_sec = date.second
if(curr_sec<10)
curr_sec="0@curr_sec@"
curr_time = "@curr_hour@:@curr_min@:@curr_sec@"
szTmpDate = "@curr_year@.@curr_month@.@curr_day@(@curr_time@)"
return szTmpDate
}
macro Paste_Today()
{
szToday=getYYYYMMDDDate()
buf=GetCurrentBuf()
SetBufSelText(buf, szToday)
}
macro Paste_MYOWN_Comment()
{
szMyName = "MY NAME"
szDate = getYYYYMMDDDate()
szComment = "/* by @szMyName@ @szDate@ */"
buf=GetCurrentBuf()
SetBufSelText(buf, szComment)
}