Loc iso zh_cn 5.1


















The Set-Location cmdlet sets the working location to a specified location. That location could be a directory, a subdirectory, a registry location, or any provider path.

PowerShell 6. This list is independent from the location stack that is accessed using the StackName parameter. This command sets the current location to the root of the Env: drive. The second command sets the location to the current location of the C: drive in the FileSystem provider.

The first command adds the current location to the Paths stack. The second command makes the Paths location stack the current location stack. The third command displays the locations in the current location stack. For information about location stacks, see the Notes. Specifies a path of the location. The value of the LiteralPath parameter is used exactly as it is typed.

No characters are interpreted as wildcard characters. If the path includes escape characters, enclose it in single quotation marks. Single quotation marks tell PowerShell not to interpret any characters as escape sequences. Returns a PathInfo object that represents the location.

By default, this cmdlet does not generate any output. In such cases, the choice of time zone, and therefore the time, is not well-defined. Date returns a time that is correct in one of the two zones involved in the transition, but it does not guarantee which.

Parse parses a formatted string and returns the time value it represents. See the documentation for the constant called Layout to see how to represent the format. The second argument must be parseable using the format string layout provided as the first argument.

When parsing only , the input may contain a fractional second field immediately after the seconds field, even if the layout does not signify its presence. In that case either a comma or a decimal point followed by a maximal series of digits is parsed as a fractional second. Elements omitted from the layout are assumed to be zero or, when zero is impossible, one, so parsing "pm" returns the time corresponding to Jan 1, year 0, UTC note that because the year is 0, this time is before the zero Time.

Years must be in the range The day of the week is checked for syntax but it is otherwise ignored. When parsing a time with a zone offset like , if the offset corresponds to a time zone used by the current location Local , then Parse uses that location and zone in the returned time. Otherwise it records the time as being in a fabricated location with time fixed at the given zone offset.

When parsing a time with a zone abbreviation like MST, if the zone abbreviation has a defined offset in the current location, then that offset is used.

If the zone abbreviation is unknown, Parse records the time as being in a fabricated location with the given zone abbreviation and a zero offset.

This choice means that such a time can be parsed and reformatted with the same layout losslessly, but the exact instant used in the representation will differ by the actual zone offset. To avoid such problems, prefer time layouts that use a numeric zone offset, or use ParseInLocation.

ParseInLocation is like Parse but differs in two important ways. First, in the absence of time zone information, Parse interprets a time as UTC; ParseInLocation interprets the time as in the given location. Second, when given a zone offset or abbreviation, Parse tries to match it against the Local location; ParseInLocation uses the given location. Unix returns the local Time corresponding to the given Unix time, sec seconds and nsec nanoseconds since January 1, UTC.

It is valid to pass nsec outside the range [0, ]. Not all sec values have a corresponding time value. AddDate returns the time corresponding to adding the given number of years, months, and days to t.

For example, AddDate -1, 2, 3 applied to January 1, returns March 4, AddDate normalizes its result in the same way that Date does, so, for example, adding one month to October 31 yields December 1, the normalized form for November AppendFormat is like Format but appends the textual representation to b and returns the extended buffer. Equal reports whether t and u represent the same time instant.

Two times can be equal even if they are in different locations. Format returns a textual representation of the time value formatted according to the layout defined by the argument. See the documentation for the constant called Layout to see how to represent the layout format. The executable example for Time. Week ranges from 1 to In returns a copy of t representing the same time instant, but with the copy's location information set to loc for display purposes.

MarshalJSON implements the json. Marshaler interface. The time is a quoted string in RFC format, with sub-second precision added if present. MarshalText implements the encoding. TextMarshaler interface. The time is formatted in RFC format, with sub-second precision added if present. Nanosecond returns the nanosecond offset within the second specified by t, in the range [0, ].

Round returns the result of rounding t to the nearest multiple of d since the zero time. The rounding behavior for halfway values is to round up. Round operates on the time as an absolute duration since the zero time; it does not operate on the presentation form of the time.

Thus, Round Hour may return a time with a non-zero minute, depending on the time's Location. The returned string is meant for debugging; for a stable serialized representation, use t. MarshalText, t. MarshalBinary, or t. Format with an explicit format string.

Sub returns the duration t-u. If the result exceeds the maximum or minimum value that can be stored in a Duration, the maximum or minimum duration will be returned. To compute t-d for a duration d, use t. Add -d. Truncate returns the result of rounding t down to a multiple of d since the zero time. Truncate operates on the time as an absolute duration since the zero time; it does not operate on the presentation form of the time. Thus, Truncate Hour may return a time with a non-zero minute, depending on the time's Location.

The result does not depend on the location associated with t. Unix-like operating systems often record time as a bit count of seconds, but since the method here returns a bit value it is valid for billions of years into the past or future.

The result is undefined if the Unix time in microseconds cannot be represented by an int64 a date before year or after year The result is undefined if the Unix time in milliseconds cannot be represented by an int64 a date more than million years before or after The result is undefined if the Unix time in nanoseconds cannot be represented by an int64 a date before the year or after Note that this means the result of calling UnixNano on the zero Time is undefined.

UnmarshalJSON implements the json. Unmarshaler interface. The time is expected to be a quoted string in RFC format.

UnmarshalText implements the encoding. TextUnmarshaler interface. The time is expected to be in RFC format. YearDay returns the day of the year specified by t, in the range [1,] for non-leap years, and [1,] in leap years.

Zone computes the time zone in effect at time t, returning the abbreviated name of the zone such as "CET" and its offset in seconds east of UTC. The Timer type represents a single event. When the Timer expires, the current time will be sent on C, unless the Timer was created by AfterFunc. AfterFunc waits for the duration to elapse and then calls f in its own goroutine.

It returns a Timer that can be used to cancel the call using its Stop method. NewTimer creates a new Timer that will send the current time on its channel after at least duration d. Reset changes the timer to expire after duration d. It returns true if the timer had been active, false if the timer had expired or been stopped.

For a Timer created with NewTimer, Reset should be invoked only on stopped or expired timers with drained channels. If a program has already received a value from t. C, the timer is known to have expired and the channel drained, so t.

Reset can be used directly. Credits Chinese Simplified Language Pack had received contribution through "By the community, for the community" community localization effort. Special thanks to community contributors for making it available. Top Contributors: Joel Yang: localized majority of the new translation volume since open the project to community. Total 40k words localized. However, iOS and OS X only support the language ID syntax consisting of a language designator and optional region or script designator.

A locale ID identifies a specific region and its cultural conventions—such as the formatting of dates, times, and numbers. To specify a locale, use an underscore character to combine a language ID with a region designator, as shown in Table B Only use a script designator in a locale ID when there is ambiguity.

If necessary, you can use a language or locale code that is not known to the NSBundle class or Core Foundation bundle functions. For example, you could create your own language designators for a language that is not yet listed in the ISO conventions or available as a language in Xcode. If you choose to create a new designator, be sure to follow the rules found in sections 2. Tags that do not follow these conventions are not guaranteed to work.



0コメント

  • 1000 / 1000