# LocalTimeUtil

`LocalTimeUtil` provides utility methods for working with `LocalTime` objects, specifically for parsing time strings.

### Methods

**`parseTime(timeString: String, timeFormat: String): LocalTime`**

* Parses a time string and returns a `LocalTime` object.
* Parameters:
  * `timeString` (type: String) - The time string to parse.
  * `timeFormat`  (type: String) - The time format to parse.
* Returns:
  * A `LocalTime` object representing the parsed time.

```typescript
var timeString = "13:45:30";
var timeFormat = "HH:mm:ss";
var parsedTime = LocalTimeUtil.parseTime(timeString, timeFormat);
// returns LocalTime object 13:45:30
```

**`formatTime(time: LocalTime, format: String): String`**

* Formats a time object and returns a `String` object.
* Parameters:
  * `time` (type: LocalTime) - The time to format.
  * `format`  (type: String) - The time format.
* Returns:
  * A `String` representing the formatted time.

```typescript
var time = LocalTime.now();
var format = "HH:mm:ss";
var formattedTime = LocalTimeUtil.formatTime(time, format);
// returns a String 13:45:30
```

This class is useful for parsing time strings and converting them into `LocalTime` objects. It simplifies the process of working with time-related data. The actual implementation of this class may depend on the underlying libraries or code used in your environment.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.b2winsuite.com/scripting/utilities/date-and-time/localtimeutil.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
