dcaef9eaa9
- Utilizzata EffectorWindow per MultipleCopyWnd - Utilizzata BaseWindow per ProcessManagerV - aggiunto titolo a TitleBar - aggiunto modulo Converters
21 lines
641 B
VB.net
21 lines
641 B
VB.net
Public Module Converters
|
|
|
|
ReadOnly dtLuaMinValue As New DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)
|
|
|
|
Public Function ConvertDateTimeToString(dtValue As DateTime) As String
|
|
If dtValue < dtLuaMinValue.AddDays(1) Then
|
|
Return ""
|
|
ElseIf dtValue > DateTime.Today Then
|
|
Dim d = dtValue.ToString("T")
|
|
Return dtValue.ToString("T")
|
|
Else
|
|
Return dtValue.ToString("d T")
|
|
End If
|
|
End Function
|
|
|
|
Public Function ConvertDateTimeToLuaInteger(dtValue As DateTime) As Integer
|
|
Return Math.Floor((dtValue.ToUniversalTime - dtLuaMinValue).TotalSeconds)
|
|
End Function
|
|
|
|
End Module
|