Rev 64 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%'============================================================='//'// Formater'//'// version: 0.2'// last modified: 15-Sep-2004 13:38 by Sasha Vukovic'=============================================================%><%Class Formater'-----------------------------------------------------------------------------------------------------------------Public Function FormatDate ( sDate, nType )Dim mDay, mMonth, mYearIf (sDate = "") OR IsNull(sDate) Then Exit FunctionCall SplitDate ( sDate, mDay, mMonth, mYear )Select Case nTypeCase 1' Jan, 26 2003'Response.write "MONTH"& mMonth &" "& sDateFormatDate = MonthName ( mMonth, TRUE ) &", "& mDay &" "& mYearEnd SelectEnd Function'-----------------------------------------------------------------------------------------------------------------Private Sub SplitDate ( sDate, ByRef outDay, ByRef outMonth, ByRef outYear )outDay = DatePart ( "D", DateValue ( sDate ) )outMonth = DatePart ( "M", DateValue ( sDate ) )outYear = DatePart ( "YYYY", DateValue ( sDate ) )End Sub'-----------------------------------------------------------------------------------------------------------------Public Function TextToHTML ( sString )Dim mStringIf (sString = "") OR IsNull(sString) Then Exit FunctionmString = Server.HTMLEncode( sString )mString = Replace(mString, VBNewLine, "<br>")TextToHTML = mStringEnd Function'-----------------------------------------------------------------------------------------------------------------Private Sub Class_Initialize()'// Perform action on creation of object. e.g. Set myObj = New ThisClassNameEnd Sub'-----------------------------------------------------------------------------------------------------------------Private Sub Class_Terminate()'// Perform action on object disposal. e.g. Set myObj = NothingEnd Sub'-----------------------------------------------------------------------------------------------------------------End Class%>