/
New-UDDateTime.txt
87 lines (56 loc) · 3.12 KB
/
New-UDDateTime.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
NAME
New-UDDateTime
SYNOPSIS
This date and time component is used for formatting dates and times using the user's browser settings.
SYNTAX
New-UDDateTime [-Id <String>] [-InputObject] <DateTime> [-LocalizedFormat <String>] [-Locale <String>] [<CommonParameters>]
New-UDDateTime [-Id <String>] [-InputObject] <DateTime> [-Format <String>] [-Locale <String>] [<CommonParameters>]
DESCRIPTION
This date and time component is used for formatting dates and times using the user's browser settings. Since Universal Dashboard PowerShell scripts run within the server, the date and time settings of the user's system are not taken into account. This component formats date and time within the client's browser to take into account their locale and time zone.
PARAMETERS
-Id <String>
The ID of this component.
Required? false
Position? named
Default value [Guid]::NewGuid()
Accept pipeline input? false
Accept wildcard characters? false
-InputObject <DateTime>
The date and time object to format.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Format <String>
The format of the date and time. This component uses Day.JS. You can learn more about formatting options on their documentation: https://day.js.org/docs/en/display/format
Required? false
Position? named
Default value DD/MM/YYYY
Accept pipeline input? false
Accept wildcard characters? false
-LocalizedFormat <String>
The localized format for the date and time. Use this format if you would like to take the user's browser locale and time zone settings into account.
Required? false
Position? named
Default value LLL
Accept pipeline input? false
Accept wildcard characters? false
-Locale <String>
The locale to use when formatting the date time. Defaults to not set.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS > Formats a date and time using the format 'DD/MM/YYYY'
New-UDDateTime -InputObject (Get-Date) -Format 'DD/MM/YYYY'
RELATED LINKS