# Working with durations

**URL:** <https://forum.rasa.com/t/working-with-durations/21099>\
**Category:** Rasa Open Source\
**Created:** [November 11, 2019, 11:51am UTC](https://forum.rasa.com/t/working-with-durations/21099 "2019-11-11T11:51:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pandreas](https://avatars.discourse-cdn.com/v4/letter/p/f08c70/32.png) [@pandreas](https://forum.rasa.com/u/pandreas)\
**Post date:** [November 11, 2019, 11:51am UTC](https://forum.rasa.com/t/working-with-durations/21099/1 "2019-11-11T11:51:33Z")

</div>

Hi,

I am currently working on a bot which let’s users book hotel rooms in german. In this domain I am facing troubles when it comes to handling duration properly.

The bot is in german, but the issue I am facing should be the same in english. Image the following chat:

```
User: Hi
Bot: Hi, I am a bot and I can help you book hotel rooms.
User: Hi, I need a room next monday until friday.
Bot: Ok, let me check if there are free rooms . . .
(Bot queries api to check if rooms are available)

```

an alternative chat could be:

```
User: Hi
Bot: Hi, I am a bot and I can help you book hotel rooms.
User: Hi, I need a room.
Bot: Ok, can you please tell me when you need the room?
User: I need the room for next monday.
Bot: Sure, how long will you be staying? 
User: For two nights.
Bot: Ok, let me check if there are free rooms . . . 
(Bot queries api to check if rooms are available)

```

**My Questions are:**

- How should I define the duration (as seen in both chats) properly?
- How can I extend the parsing to understand “two nights” as a duration while using duckling?

_Sidenote:__I am currently using duckling which could extract an `Interval` from “Hi, I need a room next monday until friday”. However in the second scenario the information is split into two sentences, so using duckling would not work._

Thanks in advance,

Andreas
