# Tarih işlemleri

## 🔨 Zaman Formatlama

{% tabs %}
{% tab title="☕ Java" %}

```java
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date myDate = dateFormat.parse(dateString);
```

{% endtab %}
{% endtabs %}

## 🕖 Önceki Tarihleri Alma

{% tabs %}
{% tab title="☕ Java" %}

```java
// Date mydate;

float ONE_DAY = 7 * 24 * 60 * 60 * 1000;
Date newDate = new Date(myDate.getTime() - ONE_DAY);
```

{% endtab %}
{% endtabs %}

## 📅 Takvim API'si ile Tarih

{% tabs %}
{% tab title="☕ Java" %}

```java
Calendar calendar = Calendar.getInstance();
calendar.setTime(myDate);
calendar.add(Calendar.DAY_OF_YEAR, -7);
Date newDate = calendar.getTime();

// String'e aktarılmak istenirse
String date = dateFormat.format(newDate);
```

{% endtab %}
{% endtabs %}

## 🔗 Faydalı Bağlantılar

{% embed url="<https://stackoverflow.com/a/3747561/9770490>" %}


---

# 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.yemreak.com/arsiv/yazilarim/tarih-islemleri.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.
