# RelativeDateTimeFormatter not available under Linux?

**URL:** <https://forums.swift.org/t/relativedatetimeformatter-not-available-under-linux/55028>\
**Category:** Using Swift\
**Tags:** linux, foundation, docker\
**Created:** [February 1, 2022, 6:37pm UTC](https://forums.swift.org/t/relativedatetimeformatter-not-available-under-linux/55028 "2022-02-01T18:37:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![macintosh-HD](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/macintosh-hd/32/14957_2.png) [@macintosh-HD](https://forums.swift.org/u/macintosh-HD)\
**Post date:** [February 1, 2022, 6:37pm UTC](https://forums.swift.org/t/relativedatetimeformatter-not-available-under-linux/55028/1 "2022-02-01T18:37:55Z")

</div>

Hi there!

just a quick question.  
I was writing on a package that should be deployed on Linux eventually. In my code I'm using the handy `RelativeDateTimeFormatter`. When I'm trying to run my code on a Docker container (Swift:5.5) I get an error:  
`error: cannot find 'RelativeDateTimeFormatter' in scope`

I made sure to import Foundation.  
Is the RelativeDateTimeFormatter not available on Linux?

---

<div class="post-metadata">

**Author:** ![0xTim](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/0xtim/32/27968_2.png) [@0xTim](https://forums.swift.org/u/0xTim)\
**Post date:** [February 1, 2022, 9:40pm UTC](https://forums.swift.org/t/relativedatetimeformatter-not-available-under-linux/55028/2 "2022-02-01T21:40:37Z")

</div>

It does look like it's missing - probably worth a bug on [bugs.swift.org](http://bugs.swift.org)

---

<div class="post-metadata">

**Author:** ![macintosh-HD](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/macintosh-hd/32/14957_2.png) [@macintosh-HD](https://forums.swift.org/u/macintosh-HD)\
**Post date:** [February 2, 2022, 11:34am UTC](https://forums.swift.org/t/relativedatetimeformatter-not-available-under-linux/55028/3 "2022-02-02T11:34:56Z")

</div>

Thanks for your answer!  
I just discovered that there is already an issue on this:

> <https://github.com/apple/swift-corelibs-foundation/issues/4222>
>
> | | |
> |------------------|-----------------|…
> |Previous ID | SR-14248 |
> |Radar | rdar://problem/74813891 |
> |Original Reporter | ogres (JIRA User) |
> |Type | Bug |
> 
> \<details\>
> \<summary\>Additional Detail from JIRA\</summary\>
> 
> | | |
> |------------------|-----------------|
> |Votes | 2 |
> |Component/s | Foundation |
> |Labels | Bug |
> |Assignee | None |
> |Priority | Medium |
> 
>    
> 
> md5: 6e364b49676cd40e1005172090ac6f33
> 
> \</details\>
> 
> 
> 
> 
> 
> \*\*Issue Description:\*\*
> 
> 
> RelativeDateTimeFormatter ( \<https://developer.apple.com/documentation/foundation/relativedatetimeformatter\> ) was introduced on Darwin in iOS 13.0/macOS 10.15, however it was not added to open-source Foundation and is not mentioned in \<https://github.com/apple/swift-corelibs-foundation/blob/main/Docs/Status.md\>

But it seems that there is no real progress on it ☹
